Esempio n. 1
0
        protected void Application_End()
        {
            var logger = UnityConfig.Container.Resolve <ILogger <WebApiApplication> >();

            logger.LogInformation("Shutting down!");

            // stop discovery client
            DiscoveryConfig.StopDiscoveryClient();

            // stop management
            ManagementConfig.Stop();
        }
Esempio n. 2
0
        protected void Application_Start()
        {
            GlobalConfiguration.Configure(WebApiConfig.Register);

            // register microsoft & steeltoe services
            ApplicationConfig.Register(Environment.GetEnvironmentVariable("ASPNET_ENVIRONMENT") ?? "Development");

            // build service provider for unity container
            ApplicationConfig.BuildServiceProvider(UnityConfig.Container);

            // start discovery client
            DiscoveryConfig.StartDiscoveryClient();

            // register and start management
            ManagementConfig.Register();
            ManagementConfig.Start();
        }