/// <summary> /// Creates the module instance to be associated with this <see cref="AssemblyModuleContext"/>. /// </summary> /// <returns>The created module object instance.</returns> protected override Module CreateModule() { Assembly assembly = Context.LoadFromAssemblyName(assemblyName); AssemblyModuleAttribute attribute = assembly.GetCustomAttribute <AssemblyModuleAttribute>(); if (attribute == null) { throw Error.AttributeNotDefined(typeof(AssemblyModuleAttribute), assembly); } return(ModuleFactory.CreateModule(attribute.ModuleType)); }
/// <summary> /// Creates the module instance to be associated with this <see cref="LocalModuleContext"/>. /// </summary> /// <returns>The created module object instance.</returns> protected override Module CreateModule() { return(ModuleFactory.CreateModule(type)); }