コード例 #1
0
ファイル: VostokHost.cs プロジェクト: lurlrlrl/hosting
        private void SetupEnvironment(IVostokHostingEnvironmentBuilder builder)
        {
            builder.SetupShutdownToken(ShutdownTokenSource.Token);
            builder.SetupShutdownTimeout(settings.ShutdownTimeout);

            RequirementsHelper.EnsurePort(settings.Application, builder);
            RequirementsHelper.EnsureConfigurations(settings.Application, builder);

            settings.EnvironmentSetup(builder);
        }
コード例 #2
0
        private void SetupCommons(IVostokHostingEnvironmentBuilder builder)
        {
            builder.SetupApplicationIdentity(
                id =>
            {
                id.SetProject("Project");
                id.SetApplication("App");
                id.SetEnvironment("Environment");
                id.SetInstance("Instance");
            });

            builder.SetupShutdownToken(shutdown.Token);

            builder.SetupShutdownTimeout(30.Seconds() + ShutdownConstants.CutAmountForExternalTimeout);

            builder.SetupLog(log => log.SetupConsoleLog());
        }
コード例 #3
0
        private void SetupEnvironment(IVostokHostingEnvironmentBuilder builder)
        {
            builder.SetupShutdownToken(ShutdownTokenSource.Token);
            builder.SetupShutdownTimeout(settings.ShutdownTimeout);
            builder.SetupHostExtensions(
                extensions =>
            {
                var vostokHostShutdown = new VostokHostShutdown(ShutdownTokenSource);
                extensions.Add(vostokHostShutdown);
                extensions.Add(typeof(IVostokHostShutdown), vostokHostShutdown);
            });

            RequirementsHelper.EnsurePort(settings.Application, builder);
            RequirementsHelper.EnsureConfigurations(settings.Application, builder);

            settings.EnvironmentSetup(builder);
        }