Пример #1
0
        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>();
        }
Пример #2
0
        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);
        }