protected virtual void OnResultObtained(NotificationResult result)
 {
     EventHandler<ResultObtainedEventArgs> handler = this.ResultObtained;
       if (handler != null)
       {
     handler(this, new ResultObtainedEventArgs(result));
       }
 }
Ejemplo n.º 2
0
 public virtual bool TryGetResultDuringSpecifiedTime(int millisecondsToWait, out NotificationResult result)
 {
     result = null;
       if (!this.RealTask.ResultWaitHandle.WaitOne(millisecondsToWait))
       {
     return false;
       }
       result = this.RealTask.ObtainedResult;
       return true;
 }
Ejemplo n.º 3
0
 public ResultObtainedEventArgs(NotificationResult result)
 {
     this.Result = result;
 }
Ejemplo n.º 4
0
 public ResultObtainedEventArgs(NotificationResult result)
 {
     this.Result = result;
 }
Ejemplo n.º 5
0
 public virtual void SetResult(NotificationResult result)
 {
     this.ObtainedResult = result;
       this.ResultWaitHandle.Set();
 }
Ejemplo n.º 6
0
 protected virtual bool SetResultIfStillNeed(NotificationResult result)
 {
     if (this.Result.Code != ResultCode.Unspecified)
       {
     return false;
       }
       this.Result = result;
       return true;
 }
 protected virtual void SetResultNotifyInterestedMen(NotificationResult result)
 {
     this.Result = result;
       this.OnResultObtained(this.Result);
 }
 public virtual bool TryGetResultDuringSpecifiedTime(int millisecondsToWait, out NotificationResult result)
 {
     result = this.GetResultWithWait();
       return true;
 }