Пример #1
0
        /// <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);
        }
Пример #2
0
        /// <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);
        }
Пример #3
0
 /// <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);
 }