示例#1
0
 internal static void Validate(NotifyUserEventPayload 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");
     }
 }
示例#2
0
 public static void Validate(NotifyUserEventPayload toValidate)
 {
     Validate(toValidate, new ArrayList());
 }