Beispiel #1
0
 internal static void Validate(ImportReport toValidate, IList validated)
 {
     if (validated.Contains(toValidate))
     {
         return;
     }
     validated.Add(toValidate);
     if (toValidate.Id == null)
     {
         throw new ArgumentException("Id is required");
     }
     if (toValidate.StartTime == null)
     {
         throw new ArgumentException("StartTime is required");
     }
     if (toValidate.EndTime == null)
     {
         throw new ArgumentException("EndTime is required");
     }
     if (toValidate.Uri == null)
     {
         throw new ArgumentException("Uri is required");
     }
     if (toValidate.BeanClass == null)
     {
         throw new ArgumentException("BeanClass is required");
     }
     if (toValidate.ServiceClass == null)
     {
         throw new ArgumentException("ServiceClass is required");
     }
     if (toValidate.Layout == null)
     {
         throw new ArgumentException("Layout is required");
     }
     toValidate.Layout.Validate(validated);
     if (toValidate.SucessCount == null)
     {
         throw new ArgumentException("SucessCount is required");
     }
     if (toValidate.ErrorsCount == null)
     {
         throw new ArgumentException("ErrorsCount is required");
     }
     if (toValidate.FilteredCount == null)
     {
         throw new ArgumentException("FilteredCount is required");
     }
     if (toValidate.SkippedCount == null)
     {
         throw new ArgumentException("SkippedCount is required");
     }
     if (toValidate.ImportErrors != null)
     {
         foreach (ImportError it in toValidate.ImportErrors)
         {
             it.Validate(validated);
         }
     }
 }
Beispiel #2
0
 public static void Validate(ImportReport toValidate)
 {
     Validate(toValidate, new ArrayList());
 }