示例#1
0
 /// <summary>
 /// Initializes a new instance of the NotificationDetailsResult class.
 /// </summary>
 /// <param name="notificationId">Notification id.</param>
 /// <param name="state">State of the notification. Possible values
 /// include: 'Cancelled', 'Completed', 'Enqueued', 'Processing',
 /// 'Unknown'</param>
 /// <param name="name">Notification name</param>
 /// <param name="sendTime">Notification send time</param>
 /// <param name="pnsSendFailure">Number of the notifications failed to
 /// send to the push provider.</param>
 /// <param name="pnsSendSuccess">Number of the notifications
 /// successfully sent to push the provider.</param>
 /// <param name="failureOutcomes">Failture outcome counts</param>
 public NotificationDetailsResult(string notificationId, string state, NotificationContent notificationContent, string name = default(string), NotificationTarget notificationTarget = default(NotificationTarget), System.DateTime?sendTime = default(System.DateTime?), int?pnsSendFailure = default(int?), int?pnsSendSuccess = default(int?), IList <NotificationFailureOutcomeCount> failureOutcomes = default(IList <NotificationFailureOutcomeCount>))
     : base(notificationId, state, name, notificationTarget, sendTime, pnsSendFailure, pnsSendSuccess)
 {
     NotificationContent = notificationContent;
     FailureOutcomes     = failureOutcomes;
     CustomInit();
 }
示例#2
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public override void Validate()
 {
     base.Validate();
     if (NotificationContent == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "NotificationContent");
     }
     if (NotificationContent != null)
     {
         NotificationContent.Validate();
     }
 }
 /// <summary>
 /// Initializes a new instance of the NotificationDefinition class.
 /// </summary>
 public NotificationDefinition(NotificationContent notificationContent, NotificationTarget notificationTarget = default(NotificationTarget))
 {
     NotificationTarget  = notificationTarget;
     NotificationContent = notificationContent;
     CustomInit();
 }