private void OnApplicationStartup(object sender, StartupEventArgs e) { Instance = this; Net = new EditorServer(); Net.Init(OnConnectedCallback, this); timer = new DispatcherTimer(); timer.Tick += OnTimerTick; timer.Start(); }
public void CreateBuiltinServer() { Log.Info("Initializing the built-in editor server..."); serverCreatedEvent = new ManualResetEventSlim(); var endPoint = new HostEndPoint(Settings.Host, Settings.RPCPort); Server = new EditorServer(endPoint); System.Threading.Tasks.Task.Run((Action)RunBuiltinServer); serverCreatedEvent.Wait(); }