public static void RegisterModule(IDependencyModule module) { foreach (var pair in module.Dependencies) { Register(pair.Key, pair.Value.TargetType, pair.Value.IsSingleton); } }
public void LoadModule(IDependencyModule module) { module.Setup(this); }
public static IServiceCollection RegisterDotChat(this IServiceCollection serviceCollection, IDependencyModule module, bool rootModule = true) { module.Register(new DependencyRegistrar(serviceCollection), rootModule); return(serviceCollection); }
public static void RegisterDependencyModule(this ContainerBuilder containerBuilder,IDependencyModule dependencyModule,Assembly[] assemblies) { log.Info("Registering dependency module: {0}", dependencyModule.GetType().Name.Replace("Dependency",string.Empty).Replace("Module", string.Empty)); dependencyModule.RegisterDependencies(containerBuilder,assemblies ?? new Assembly[0]); }
public static ContainerBuilder RegisterDotChat(this ContainerBuilder serviceCollection, IDependencyModule module, bool rootModule = true) { module.Register(new DependencyRegistrar(serviceCollection), rootModule); return(serviceCollection); }
public static void AddModule(this IServiceCollection services, IDependencyModule module) { module.Configure(services); }
public static void RegisterModule(this IServiceCollection collection, IDependencyModule dependencyModule) => dependencyModule?.Register(collection);
public void RegisterModule(IDependencyModule module) { module.Register(this); }