Exemple #1
0
 internal static void Validate(PushNotifyUserEventPayload toValidate, IList validated)
 {
     if (validated.Contains(toValidate))
     {
         return;
     }
     validated.Add(toValidate);
     if (toValidate.NotificationKind == null)
     {
         throw new ArgumentException("NotificationKind is required");
     }
     if (toValidate.NotificationPriority == null)
     {
         throw new ArgumentException("NotificationPriority is required");
     }
     if (toValidate.NotificationSubject == null)
     {
         throw new ArgumentException("NotificationSubject is required");
     }
     if (toValidate.NotificationContent == null)
     {
         throw new ArgumentException("NotificationContent is required");
     }
     if (toValidate.SourceDomain == null)
     {
         throw new ArgumentException("SourceDomain is required");
     }
     if (toValidate.SourceService == null)
     {
         throw new ArgumentException("SourceService is required");
     }
     if (toValidate.DestinationUser == null)
     {
         throw new ArgumentException("DestinationUser is required");
     }
     if (toValidate.ApplicationId == null)
     {
         throw new ArgumentException("ApplicationId is required");
     }
 }
Exemple #2
0
 public static void Validate(PushNotifyUserEventPayload toValidate)
 {
     Validate(toValidate, new ArrayList());
 }