示例#1
0
        public virtual INotificationResultCourier EnqueueToShow(IResultProvider notificationVM, string originator)
        {
            this.AssertInitialized();
            NotificationDisplayTask displayTask = this.GetDisplayTask(notificationVM, originator);

            if (!this.AddToDisplayQueue(displayTask))
            {
                displayTask.SetResult(new NotificationResult(ResultCode.Unspecified));
                displayTask.State = NotificationState.Aborted;
            }
            return(new NotificationResultCourier(displayTask));
        }
示例#2
0
 protected virtual bool AddToDisplayQueue(NotificationDisplayTask task)
 {
     return(this.Provider.EnqueueToDisplay(task));
 }
示例#3
0
 public NotificationResultCourier([NotNull] NotificationDisplayTask realTask)
 {
     Assert.ArgumentNotNull(realTask, "realTask");
     this.RealTask = realTask;
 }
 protected virtual bool AddToDisplayQueue(NotificationDisplayTask task)
 {
     return this.Provider.EnqueueToDisplay(task);
 }