protected virtual void WindowVM_ResultObtained(object sender, ResultObtainedEventArgs e)
 {
     lock (this.Lock)
     {
         var vmFiredEvent = sender as NotificationWindowVM;
         Assert.IsNotNull(vmFiredEvent, "Result source cannot be null");
         var correspondingBag = this.DisplayedWaitForResultTasks.FirstOrDefault(x => x.WindowVM == vmFiredEvent);
         if (correspondingBag == null)
         {
             return;
         }
         this.DisplayedWaitForResultTasks.Remove(correspondingBag);
         correspondingBag.Task.State = NotificationState.Handled;
         correspondingBag.Task.SetResult(vmFiredEvent.Result);
         this.ProcessPendingQueue();
     }
 }
Esempio n. 2
0
 protected virtual void OnResultObtainedFromNestedNotification(object sender, ResultObtainedEventArgs e)
 {
     this.SetResultIfStillNeed(e.Result);
     this.IsAlive = false;
     this.FireFireworkWeHaveResult();
 }