private VostokApplicationRunResult BuildEnvironment() { ChangeStateTo(VostokApplicationState.EnvironmentSetup); try { var environmentFactorySettings = new VostokHostingEnvironmentFactorySettings { ConfigureStaticProviders = settings.ConfigureStaticProviders, BeaconShutdownTimeout = settings.BeaconShutdownTimeout, BeaconShutdownWaitEnabled = settings.BeaconShutdownWaitEnabled, SendAnnotations = settings.SendAnnotations }; environment = EnvironmentBuilder.Build(SetupEnvironment, environmentFactorySettings); log = environment.Log.ForContext <VostokHost>(); return(null); } catch (Exception error) { return(ReturnResult(VostokApplicationState.CrashedDuringEnvironmentSetup, error)); } }
private VostokMultiHostRunResult BuildCommonEnvironment() { try { commonEnvironment = SetupEnvironment(); log = commonEnvironment.Log; return(null); } catch (Exception error) { return(ReturnResult(VostokMultiHostState.CrashedDuringEnvironmentSetup, error)); } }