コード例 #1
0
ファイル: PedidosValidator.cs プロジェクト: jvpersuhn/Senior
 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
ファイル: PedidosValidator.cs プロジェクト: jvpersuhn/Senior
 public static void Validate(NotifyUserEventPayload toValidate)
 {
     Validate(toValidate, new ArrayList());
 }