static void HostedMain() { //Initialize sync context SynchronizationContext.SetSynchronizationContext(new WindowsFormsSynchronizationContext()); var comm = new CommChannel(Console.OpenStandardInput(), Console.OpenStandardOutput()); Console.SetOut(new NullTextWriter()); Console.SetError(new NullTextWriter()); comm.Disposed += () => Process.GetCurrentProcess().Kill(); comm.SendMessage(new StateMessage("Staying awhile and listening...")); var service = new AvaloniaAppHost(comm); service.Start(); Application.Run(); }
internal HostedAppModel(AvaloniaAppHost host) { _host = host; Background = Settings.Background; }