Пример #1
0
        private static IWindsorContainer CreateContainer()
        {
            var container = new WindsorContainer();

            container.AddConfiguration(
                b => b.AddJsonFile("appsettings.json", true),
                b => b.AddEnvironmentVariables()
                );

            container.Kernel.Resolver.AddSubResolver(new CollectionResolver(container.Kernel));

            container.Install(FromAssembly.InThisApplication());

            container.AddFacility <WcfFacility>();

            container.Install(new WcfInstaller <StorageResourceAccess>());

            return(container);
        }
Пример #2
0
        private static IWindsorContainer CreateContainer()
        {
            var container = new WindsorContainer();

            container.AddConfiguration(
                b => b.AddJsonFile("appsettings.json", true),
                b => b.AddEnvironmentVariables()
                );

            // Check https://app.assembla.com/spaces/studentum/git-8/source/master/Configuration/CastleWindsor/README.md for usages

            container.Kernel.Resolver.AddSubResolver(new CollectionResolver(container.Kernel));

            container.Install(FromAssembly.InThisApplication());

            container.AddFacility <WcfFacility>();

            container.Install(new WcfInstaller <NotificationEngine>());

            return(container);
        }