protected override void RegisterAdditionalModules( IModuleRegistration modules) { modules.RegisterModule <SampleApiModule>(); base.RegisterAdditionalModules(modules); }
protected override void RegisterAdditionalModules( IModuleRegistration modules) { modules.RegisterModule <RootstockJobModule>(); base.RegisterAdditionalModules(modules); }
protected override void RegisterAdditionalModules( IModuleRegistration modules) { base.RegisterAdditionalModules(modules); modules.RegisterModule <JobModule <T> >(); }
protected override void RegisterAdditionalModules( IModuleRegistration modules) { modules.RegisterModule <SignServiceModule <T> >(); base.RegisterAdditionalModules(modules); }
private static OrderedModuleRegistration CreateModuleInstance( IModuleRegistration moduleRegistration, IKeyValueConfiguration keyValueConfiguration) { if (!moduleRegistration.ModuleType.IsPublicClassWithDefaultConstructor()) { if (moduleRegistration.ModuleType.TakesTypeInPublicCtor <IKeyValueConfiguration>()) { if (Activator.CreateInstance(moduleRegistration.ModuleType, keyValueConfiguration) is IModule moduleWithArgs) { return(new OrderedModuleRegistration(moduleRegistration, moduleWithArgs)); } } throw new DeployerAppException( $"Could not instantiate module type {moduleRegistration.ModuleType.FullName} with custom constructor"); } if (Activator.CreateInstance(moduleRegistration.ModuleType) is IModule module) { return(new OrderedModuleRegistration(moduleRegistration, module)); } throw new DeployerAppException( $"Could not instantiate module type {moduleRegistration.ModuleType.FullName} with default constructor"); }
protected virtual void RegisterAdditionalModules( IModuleRegistration modules) { }
public OrderedModuleRegistration(IModuleRegistration moduleRegistration, IModule module) { ModuleRegistration = moduleRegistration; Module = module; }