コード例 #1
0
        public static void StartDefault()
        {
            var configSource       = new SystemConfigurationSource();
            var bootstrapperConfig = new UnityBootstrapperConfiguration(configSource);
            var bootstrapper       = new UnityBootstrapper(bootstrapperConfig);

            bootstrapper.Startup();
        }
コード例 #2
0
        protected void Application_Start(object sender, EventArgs e)
        {
            var configSource       = new WebConfigurationSource();
            var bootstrapperConfig = new UnityBootstrapperConfiguration(configSource);
            var bootstrapper       = new UnityBootstrapper(bootstrapperConfig);

            bootstrapper.Startup();
        }
コード例 #3
0
        public void BootstrapperShutdownTest()
        {
            var configSource       = new DefaultUnityStaticConfigurationSource();
            var bootstrapperConfig = new UnityBootstrapperConfiguration(configSource);
            var bootstrapper       = new UnityBootstrapper(bootstrapperConfig);

            bootstrapper.Startup();

            bootstrapper.Shutdown();
        }
コード例 #4
0
        public static void Main(string[] args)
        {
            var configSource       = new SystemConfigurationSource();
            var bootstrapperConfig = new UnityBootstrapperConfiguration(configSource);
            var bootstrapper       = new UnityBootstrapper(bootstrapperConfig);

            bootstrapper.Startup();

            EventfulRestClient();
            Console.ReadLine();

            Console.WriteLine("Press a key to exit..");
            Console.ReadLine();
        }
コード例 #5
0
        public void BootstrapperStartupTest()
        {
            var configSource       = new SystemConfigurationSource();
            var bootstrapperConfig = new UnityBootstrapperConfiguration(configSource);
            var bootstrapper       = new UnityBootstrapper(bootstrapperConfig);

            bootstrapper.AddBootstrapperTasks(new BootstrapperTask());

            bootstrapper.Startup();

            var expected = typeof(TraceLoggerFactory);
            var actual   = ServiceLocator.Current.GetInstance <ILoggerFactory>().GetType();

            Assert.AreEqual(expected, actual);
        }
コード例 #6
0
        private static void Main(string[] args)
        {
            var configSource       = new SystemConfigurationSource();
            var bootstrapperConfig = new UnityBootstrapperConfiguration(configSource);
            var bootstrapper       = new UnityBootstrapper(bootstrapperConfig);

            bootstrapper.Startup();

            WriteContainerInfo();

            //LoggerSample();
            //SettingSample();
            CachedSettingBehaviorSample();
            //FindTypes();

            WriteContainerInfo();

            Console.ReadLine();
        }