Ejemplo n.º 1
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public override void Validate()
 {
     base.Validate();
     if (Source == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Source");
     }
     if (Sink == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Sink");
     }
     if (StagingSettings != null)
     {
         StagingSettings.Validate();
     }
     if (RedirectIncompatibleRowSettings != null)
     {
         RedirectIncompatibleRowSettings.Validate();
     }
     if (LogStorageSettings != null)
     {
         LogStorageSettings.Validate();
     }
     if (LogSettings != null)
     {
         LogSettings.Validate();
     }
     if (Inputs != null)
     {
         foreach (var element in Inputs)
         {
             if (element != null)
             {
                 element.Validate();
             }
         }
     }
     if (Outputs != null)
     {
         foreach (var element1 in Outputs)
         {
             if (element1 != null)
             {
                 element1.Validate();
             }
         }
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the CopyActivity class.
 /// </summary>
 /// <param name="name">Activity name.</param>
 /// <param name="source">Copy activity source.</param>
 /// <param name="sink">Copy activity sink.</param>
 /// <param name="additionalProperties">Unmatched properties from the
 /// message are deserialized this collection</param>
 /// <param name="description">Activity description.</param>
 /// <param name="dependsOn">Activity depends on condition.</param>
 /// <param name="userProperties">Activity user properties.</param>
 /// <param name="linkedServiceName">Linked service reference.</param>
 /// <param name="policy">Activity policy.</param>
 /// <param name="translator">Copy activity translator. If not
 /// specified, tabular translator is used.</param>
 /// <param name="enableStaging">Specifies whether to copy data via an
 /// interim staging. Default value is false. Type: boolean (or
 /// Expression with resultType boolean).</param>
 /// <param name="stagingSettings">Specifies interim staging settings
 /// when EnableStaging is true.</param>
 /// <param name="parallelCopies">Maximum number of concurrent sessions
 /// opened on the source or sink to avoid overloading the data store.
 /// Type: integer (or Expression with resultType integer), minimum:
 /// 0.</param>
 /// <param name="dataIntegrationUnits">Maximum number of data
 /// integration units that can be used to perform this data movement.
 /// Type: integer (or Expression with resultType integer), minimum:
 /// 0.</param>
 /// <param name="enableSkipIncompatibleRow">Whether to skip
 /// incompatible row. Default value is false. Type: boolean (or
 /// Expression with resultType boolean).</param>
 /// <param name="redirectIncompatibleRowSettings">Redirect incompatible
 /// row settings when EnableSkipIncompatibleRow is true.</param>
 /// <param name="inputs">List of inputs for the activity.</param>
 /// <param name="outputs">List of outputs for the activity.</param>
 public CopyActivity(string name, CopySource source, CopySink sink, IDictionary <string, object> additionalProperties = default(IDictionary <string, object>), string description = default(string), IList <ActivityDependency> dependsOn = default(IList <ActivityDependency>), IList <UserProperty> userProperties = default(IList <UserProperty>), LinkedServiceReference linkedServiceName = default(LinkedServiceReference), ActivityPolicy policy = default(ActivityPolicy), CopyTranslator translator = default(CopyTranslator), object enableStaging = default(object), StagingSettings stagingSettings = default(StagingSettings), object parallelCopies = default(object), object dataIntegrationUnits = default(object), object enableSkipIncompatibleRow = default(object), RedirectIncompatibleRowSettings redirectIncompatibleRowSettings = default(RedirectIncompatibleRowSettings), IList <DatasetReference> inputs = default(IList <DatasetReference>), IList <DatasetReference> outputs = default(IList <DatasetReference>))
     : base(name, additionalProperties, description, dependsOn, userProperties, linkedServiceName, policy)
 {
     Source                          = source;
     Sink                            = sink;
     Translator                      = translator;
     EnableStaging                   = enableStaging;
     StagingSettings                 = stagingSettings;
     ParallelCopies                  = parallelCopies;
     DataIntegrationUnits            = dataIntegrationUnits;
     EnableSkipIncompatibleRow       = enableSkipIncompatibleRow;
     RedirectIncompatibleRowSettings = redirectIncompatibleRowSettings;
     Inputs                          = inputs;
     Outputs                         = outputs;
     CustomInit();
 }