public static bool IsBehavior(this Type behaviorType) { return behaviorType.GetInterfaces() .Any(x => x.IsGenericType && x.GetGenericTypeDefinition() == BehaviorInterfaceType); }