/// <summary>
 /// Constructor for ExportConfig
 /// </summary>
 /// <param name="uri">
 ///<summary>
 /// TBD
 ///</summary>
 /// </param>
 /// <param name="layout">
 ///<summary>
 /// TBD
 ///</summary>
 /// </param>
 /// <param name="async">
 ///<summary>
 /// TBD
 ///</summary>
 /// </param>
 /// <param name="errorStrategy">
 ///<summary>
 /// TBD
 ///</summary>
 /// </param>
 public ExportConfig(string uri, Layoutdto layout, bool?async, string errorStrategy)
 {
     this.Uri           = uri;
     this.Layout        = layout;
     this.Async         = async;
     this.ErrorStrategy = errorStrategy;
 }
Пример #2
0
 /// <summary>
 /// Constructor for ImportConfig
 /// </summary>
 /// <param name="uri">
 ///<summary>
 /// TBD
 ///</summary>
 /// </param>
 /// <param name="layout">
 ///<summary>
 /// TBD
 ///</summary>
 /// </param>
 /// <param name="async">
 ///<summary>
 /// TBD
 ///</summary>
 /// </param>
 /// <param name="batchSize">
 ///<summary>
 /// TBD
 ///</summary>
 /// </param>
 /// <param name="errorStrategy">
 ///<summary>
 /// TBD
 ///</summary>
 /// </param>
 public ImportConfig(string uri, Layoutdto layout, bool?async, long?batchSize, ErrorStrategy?errorStrategy)
 {
     this.Uri           = uri;
     this.Layout        = layout;
     this.Async         = async;
     this.BatchSize     = batchSize;
     this.ErrorStrategy = errorStrategy;
 }
Пример #3
0
 internal static void Validate(Layoutdto toValidate, IList validated)
 {
     if (validated.Contains(toValidate))
     {
         return;
     }
     validated.Add(toValidate);
     if (toValidate.Id == null)
     {
         throw new ArgumentException("Id is required");
     }
     if (toValidate.Description == null)
     {
         throw new ArgumentException("Description is required");
     }
     if (toValidate.FileFormat == null)
     {
         throw new ArgumentException("FileFormat is required");
     }
     if (toValidate.ErrorStrategy == null)
     {
         throw new ArgumentException("ErrorStrategy is required");
     }
     if (toValidate.SkipLines == null)
     {
         throw new ArgumentException("SkipLines is required");
     }
     if (toValidate.Fields == null || toValidate.Fields.Count == 0)
     {
         throw new ArgumentException("Fields is required, at least one value must be present");
     }
     foreach (Fielddto it in toValidate.Fields)
     {
         it.Validate(validated);
     }
     if (toValidate.Hooks != null)
     {
         foreach (Hookdto it in toValidate.Hooks)
         {
             it.Validate(validated);
         }
     }
 }
Пример #4
0
 public static void Validate(Layoutdto toValidate)
 {
     Validate(toValidate, new ArrayList());
 }
 /// <summary>
 /// Constructor for ImportReport
 /// </summary>
 /// <param name="id">
 ///<summary>
 /// TBD
 ///</summary>
 /// </param>
 /// <param name="startTime">
 ///<summary>
 /// TBD
 ///</summary>
 /// </param>
 /// <param name="endTime">
 ///<summary>
 /// TBD
 ///</summary>
 /// </param>
 /// <param name="uri">
 ///<summary>
 /// TBD
 ///</summary>
 /// </param>
 /// <param name="beanClass">
 ///<summary>
 /// TBD
 ///</summary>
 /// </param>
 /// <param name="serviceClass">
 ///<summary>
 /// TBD
 ///</summary>
 /// </param>
 /// <param name="layout">
 ///<summary>
 /// TBD
 ///</summary>
 /// </param>
 /// <param name="sucessCount">
 ///<summary>
 /// TBD
 ///</summary>
 /// </param>
 /// <param name="errorsCount">
 ///<summary>
 /// TBD
 ///</summary>
 /// </param>
 /// <param name="filteredCount">
 ///<summary>
 /// TBD
 ///</summary>
 /// </param>
 /// <param name="skippedCount">
 ///<summary>
 /// TBD
 ///</summary>
 /// </param>
 public ImportReport(string id, DateTime?startTime, DateTime?endTime, string uri, string beanClass, string serviceClass, Layoutdto layout, long?sucessCount, long?errorsCount, long?filteredCount, long?skippedCount)
 {
     this.Id            = id;
     this.StartTime     = startTime;
     this.EndTime       = endTime;
     this.Uri           = uri;
     this.BeanClass     = beanClass;
     this.ServiceClass  = serviceClass;
     this.Layout        = layout;
     this.SucessCount   = sucessCount;
     this.ErrorsCount   = errorsCount;
     this.FilteredCount = filteredCount;
     this.SkippedCount  = skippedCount;
 }