/// <summary> /// Applies the dynamic extensions. /// </summary> /// <param name="bendyObject">The bendy object.</param> public static void ApplyDynamicExtensions <TItemType>(BendyObject bendyObject, IEnumerable <Assembly> dynamicExtensionAssemblies = null) { IEnumerable <MethodInfo> methods; var supportedTypes = new[] { typeof(BendyObject), typeof(TItemType) }; if (dynamicExtensionAssemblies == null) { dynamicExtensionAssemblies = TypeFinder.GetFilteredDomainAssemblies().ToArray(); } methods = DynamicExtensionsHelper.GetExtensions(dynamicExtensionAssemblies, supportedTypes); ApplyDynamicExtensions <TItemType>(bendyObject, methods); }
/// <summary> /// Applies the dynamic field extensions. /// </summary> /// <typeparam name="TParentType">The type of the parent item.</typeparam> /// <param name="parent">The parent.</param> /// <param name="propertyEditorId">The property editor id.</param> /// <param name="bendyObject">The bendy object.</param> public static void ApplyDynamicFieldExtensions <TParentType>(TParentType parent, string propertyEditorId, BendyObject bendyObject, IEnumerable <Assembly> dynamicExtensionAssemblies = null) where TParentType : TypedEntity { IEnumerable <MethodInfo> methods; var supportedTypes = new[] { typeof(BendyObject), typeof(TypedAttribute), typeof(TParentType) }; if (dynamicExtensionAssemblies == null) { dynamicExtensionAssemblies = TypeFinder.GetFilteredDomainAssemblies().ToArray(); } methods = DynamicExtensionsHelper.GetExtensions <DynamicFieldExtensionAttribute>(dynamicExtensionAssemblies, supportedTypes); ApplyDynamicFieldExtensions(parent, propertyEditorId, bendyObject, methods); }