Exemplo 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();
     }
 }
Exemplo 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();
     }
 }