Entitas  0.40.0
Entitas is a super fast Entity Component System (ECS) Framework specifically made for C# and Unity
InterfaceTypeExtension.cs
1 using System;
2 using System.Linq;
3 
4 namespace Entitas {
5 
6  public static class InterfaceTypeExtension {
7 
8  /// Determines whether the type implements the specified interface
9  /// and is not an interface itself.
10  public static bool ImplementsInterface<T>(this Type type) {
11  if(!type.IsInterface && type.GetInterfaces().Contains(typeof(T))) {
12  return true;
13  }
14 
15  return false;
16  }
17  }
18 }
static bool ImplementsInterface< T >(this Type type)