Esempio n. 1
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (VmSize == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "VmSize");
     }
     if (UserAccountSettings == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "UserAccountSettings");
     }
     if (ScaleSettings != null)
     {
         ScaleSettings.Validate();
     }
     if (VirtualMachineConfiguration != null)
     {
         VirtualMachineConfiguration.Validate();
     }
     if (NodeSetup != null)
     {
         NodeSetup.Validate();
     }
     if (UserAccountSettings != null)
     {
         UserAccountSettings.Validate();
     }
     if (Subnet != null)
     {
         Subnet.Validate();
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (ScaleSettings != null)
     {
         ScaleSettings.Validate();
     }
     if (VirtualMachineConfiguration != null)
     {
         VirtualMachineConfiguration.Validate();
     }
     if (NodeSetup != null)
     {
         NodeSetup.Validate();
     }
     if (UserAccountSettings != null)
     {
         UserAccountSettings.Validate();
     }
     if (Subnet != null)
     {
         Subnet.Validate();
     }
     if (NodeStateCounts != null)
     {
         NodeStateCounts.Validate();
     }
 }