public static void Main(string[] args) { var host = CreateWebHostBuilder(args).Build(); ProtobufSerialization.Warm(); LocalSystem .Bootstrap() .Build(); host.Run(); Console.CancelKeyPress += (sender, eventArgs) => LocalSystem.Instance.Shutdown(); AssemblyLoadContext.Default.Unloading += _ => LocalSystem.Instance.Shutdown(); LocalSystem.Instance .KeepAlive() .Wait(); }
public void Build() { Instance = new LocalSystem(_config); }