示例#1
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (ResourceSettings == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "ResourceSettings");
     }
     if (ResourceSettings != null)
     {
         ResourceSettings.Validate();
     }
 }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the EnvironmentSetting class.
 /// </summary>
 /// <param name="resourceSettings">The resource specific
 /// settings</param>
 /// <param name="id">The identifier of the resource.</param>
 /// <param name="name">The name of the resource.</param>
 /// <param name="type">The type of the resource.</param>
 /// <param name="location">The location of the resource.</param>
 /// <param name="tags">The tags of the resource.</param>
 /// <param name="publishingState">Describes the readiness of this
 /// environment setting. Possible values include: 'Draft',
 /// 'Publishing', 'Published', 'PublishFailed', 'Scaling'</param>
 /// <param name="configurationState">Describes the user's progress in
 /// configuring their environment setting. Possible values include:
 /// 'NotApplicable', 'Completed'</param>
 /// <param name="description">Describes the environment and its
 /// resource settings</param>
 /// <param name="title">Brief title describing the environment and its
 /// resource settings</param>
 /// <param name="lastChanged">Time when the template VM was last
 /// changed.</param>
 /// <param name="lastPublished">Time when the template VM was last sent
 /// for publishing.</param>
 /// <param name="provisioningState">The provisioning status of the
 /// resource.</param>
 /// <param name="uniqueIdentifier">The unique immutable identifier of a
 /// resource (Guid).</param>
 /// <param name="latestOperationResult">The details of the latest
 /// operation. ex: status, error</param>
 public EnvironmentSetting(ResourceSettings resourceSettings, string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary <string, string> tags = default(IDictionary <string, string>), string publishingState = default(string), string configurationState = default(string), string description = default(string), string title = default(string), System.DateTime?lastChanged = default(System.DateTime?), System.DateTime?lastPublished = default(System.DateTime?), string provisioningState = default(string), string uniqueIdentifier = default(string), LatestOperationResult latestOperationResult = default(LatestOperationResult))
     : base(id, name, type, location, tags)
 {
     PublishingState    = publishingState;
     ConfigurationState = configurationState;
     Description        = description;
     Title                 = title;
     ResourceSettings      = resourceSettings;
     LastChanged           = lastChanged;
     LastPublished         = lastPublished;
     ProvisioningState     = provisioningState;
     UniqueIdentifier      = uniqueIdentifier;
     LatestOperationResult = latestOperationResult;
     CustomInit();
 }