/// <summary> /// Registers all types marked with a MoonSharpUserDataAttribute that ar contained in an assembly. /// </summary> /// <param name="asm">The assembly.</param> /// <param name="includeExtensionTypes">if set to <c>true</c> extension types are registered to the appropriate registry.</param> public static void RegisterAssembly(Assembly asm = null, bool includeExtensionTypes = false) { if (asm == null) { asm = Assembly.GetCallingAssembly(); } TypeDescriptorRegistry.RegisterAssembly(asm, includeExtensionTypes); }
/// <summary> /// Registers all types marked with a MoonSharpUserDataAttribute that ar contained in an assembly. /// </summary> /// <param name="asm">The assembly.</param> /// <param name="includeExtensionTypes">if set to <c>true</c> extension types are registered to the appropriate registry.</param> public static void RegisterAssembly(Assembly asm = null, bool includeExtensionTypes = false) { if (asm == null) { #if NETFX_CORE || DOTNET_CORE throw new NotSupportedException("Assembly.GetCallingAssembly is not supported on target framework."); #else asm = Assembly.GetCallingAssembly(); #endif } TypeDescriptorRegistry.RegisterAssembly(asm, includeExtensionTypes); }
/// <summary> /// Registers all types marked with a MoonSharpUserDataAttribute that ar contained in an assembly. /// </summary> /// <param name="asm">The assembly.</param> /// <param name="includeExtensionTypes">if set to <c>true</c> extension types are registered to the appropriate registry.</param> public static void RegisterAssembly(Assembly asm = null, bool includeExtensionTypes = false) { TypeDescriptorRegistry.RegisterAssembly(asm, includeExtensionTypes); }