public static BaseModule Build(BaseContainer modContainer, IModuleAttribute moduleBuilder) { if (modContainer == null) { throw new ArgumentNullException(nameof(modContainer)); } if (moduleBuilder == null) { throw new ArgumentNullException(nameof(moduleBuilder)); } try { return((BaseModule)InvokeBuildMethod( moduleBuilder.GetType(), moduleBuilder.ModifyAppliedType(modContainer.Member.MemberType), nameof(IModuleAttribute.Build), moduleBuilder, modContainer)); } catch (TargetInvocationException tie) { throw tie.InnerException; } }
public ModuleContainer(Uri path, Type type, IModuleAttribute attribute, IModuleHost host) { Host = host; Path = path; ModuleType = type; ModuleAttributes = attribute; LoadContext = new AssemblyLoader(path); }