コード例 #1
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="Rest.ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (ConnectVia != null)
     {
         ConnectVia.Validate();
     }
     if (Parameters != null)
     {
         foreach (var valueElement in Parameters.Values)
         {
             if (valueElement != null)
             {
                 valueElement.Validate();
             }
         }
     }
 }
コード例 #2
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public override void Validate()
 {
     base.Validate();
     if (PackageLocation == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "PackageLocation");
     }
     if (ConnectVia == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "ConnectVia");
     }
     if (PackageLocation != null)
     {
         PackageLocation.Validate();
     }
     if (ExecutionCredential != null)
     {
         ExecutionCredential.Validate();
     }
     if (ConnectVia != null)
     {
         ConnectVia.Validate();
     }
     if (ProjectParameters != null)
     {
         foreach (var valueElement in ProjectParameters.Values)
         {
             if (valueElement != null)
             {
                 valueElement.Validate();
             }
         }
     }
     if (PackageParameters != null)
     {
         foreach (var valueElement1 in PackageParameters.Values)
         {
             if (valueElement1 != null)
             {
                 valueElement1.Validate();
             }
         }
     }
     if (ProjectConnectionManagers != null)
     {
         foreach (var valueElement2 in ProjectConnectionManagers.Values)
         {
             if (valueElement2 != null)
             {
                 foreach (var valueElement3 in valueElement2.Values)
                 {
                     if (valueElement3 != null)
                     {
                         valueElement3.Validate();
                     }
                 }
             }
         }
     }
     if (PackageConnectionManagers != null)
     {
         foreach (var valueElement4 in PackageConnectionManagers.Values)
         {
             if (valueElement4 != null)
             {
                 foreach (var valueElement5 in valueElement4.Values)
                 {
                     if (valueElement5 != null)
                     {
                         valueElement5.Validate();
                     }
                 }
             }
         }
     }
     if (PropertyOverrides != null)
     {
         foreach (var valueElement6 in PropertyOverrides.Values)
         {
             if (valueElement6 != null)
             {
                 valueElement6.Validate();
             }
         }
     }
     if (LogLocation != null)
     {
         LogLocation.Validate();
     }
 }