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 PerspexAppHost(comm); service.Start(); Application.Run(); }
internal HostedAppModel(PerspexAppHost host) { _host = host; Background = Settings.Background; }