Added generic type test to path resolve override

This commit is contained in:
Robert Beekman committed 2019-08-21 13:12:31 +02:00
1 parent 254a8e311f
commit d8e803c531
3 files changed
+25 -1

No files matched your search

@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Artemis.Core.Extensions
{
public static class TypeExtensions
{
public static bool IsGenericType(this Type type, Type genericType)
{
if (type == null)
return false;
var baseType = type.BaseType;
if (baseType == null)
return false;
return baseType.GetGenericTypeDefinition() == genericType;
}
}
}