/// <summary> /// Does startup work. /// </summary> public void Start() { try { genericHost.Start().GetAwaiter().GetResult(); } catch (Exception ex) { Log.Fatal("Start failure", ex); Environment.Exit(-1); } }
/// <summary> /// Does startup work. /// </summary> public void Start() { try { genericHost.Start().GetAwaiter().GetResult(); } catch (Exception exception) { var log = LogManager.GetLogger <WindowsHost>(); // Defers logger creation to allow custom logging configuration log.Fatal("Start failure", exception); Environment.Exit(-1); } }
static async Task <IWantToRunContext> RunHost() { var defaultProfiles = new List <Type> { typeof(Production) }; string[] args = {}; var context = new IWantToRunContext(); var configurer = new GenericEndpointConfig(context); var host = new GenericHost(configurer, args, defaultProfiles, GenericEndpointConfig.EndpointName); await host.Start(); await host.Stop(); return(context); }
/// <summary> /// Does startup work. /// </summary> public void Start() { genericHost.Start(); }
/// <summary> /// Does startup work. /// </summary> public void Start() { genericHost.Start().GetAwaiter().GetResult(); }