Beispiel #1
0
 void InvokeEventOnCoreClosing(object sender, EventArgs args)
 {
     try
     {
         var coreCtrl = sender as Controller.CoreServerCtrl;
         var uid      = coreCtrl.GetUid();
         OnCoreClosing?.Invoke(null, new VgcApis.Models.Datas.StrEvent(uid));
     }
     catch { }
 }
Beispiel #2
0
 public void StopCoreThen(Action next = null)
 {
     OnCoreClosing?.Invoke(this, EventArgs.Empty);
     Task.Factory.StartNew(() => server.StopCoreThen(
                               () =>
     {
         OnRequireNotifierUpdate?.Invoke(this, EventArgs.Empty);
         OnRequireKeepTrack?.Invoke(this, new VgcApis.Models.Datas.BoolEvent(false));
         next?.Invoke();
     }));
 }
Beispiel #3
0
 public void CleanupThen(Action next)
 {
     OnCoreClosing?.Invoke(this, EventArgs.Empty);
     this.server.StopCoreThen(() =>
     {
         this.server.OnLog -= OnLogHandler;
         this.server.OnCoreStatusChanged -= OnCoreStateChangedHandler;
         Task.Factory.StartNew(() =>
         {
             next?.Invoke();
         });
     });
 }
Beispiel #4
0
 public void InvokeEventOnCoreClosing() =>
 OnCoreClosing?.Invoke(this, EventArgs.Empty);