public static void RegisterCSCoreInterfaces(this ContainerBuilder builder, CsCore coreModule) { var core = coreModule; builder.Register(x => core.ResolveAppService <IDemoAppService>()).As <IDemoAppService>(); builder.Register(x => core.ResolveAppService <IUserAppService>()).As <IUserAppService>(); builder.Register(x => core.ResolveAppService <ITokenAppService>()).As <ITokenAppService>(); builder.Register(x => core.ResolveAppService <IModuleAppService>()).As <IModuleAppService>(); }
protected override void Load(ContainerBuilder builder) { Action <Type[]> noop = _ => { }; var referencedAssemblies = new[] { //DataAccess typeof(Core.DataAccess.Demo.DemoQuery), typeof(Core.AppServices.Demo.DemoAppService) }; noop(referencedAssemblies); builder.RegisterModule <ApiServiceDIModule>(); var csModule = new CsCore().Init(); builder.RegisterCSCoreInterfaces(csModule); }