예제 #1
0
        protected override void RegisterAdditionalModules(
            IModuleRegistration modules)
        {
            modules.RegisterModule <SampleApiModule>();

            base.RegisterAdditionalModules(modules);
        }
예제 #2
0
        protected override void RegisterAdditionalModules(
            IModuleRegistration modules)
        {
            modules.RegisterModule <RootstockJobModule>();

            base.RegisterAdditionalModules(modules);
        }
예제 #3
0
        protected override void RegisterAdditionalModules(
            IModuleRegistration modules)
        {
            base.RegisterAdditionalModules(modules);

            modules.RegisterModule <JobModule <T> >();
        }
예제 #4
0
        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;
 }