/// <summary> /// Validate the object. /// </summary> /// <exception cref="ValidationException"> /// Thrown if validation fails /// </exception> public virtual void Validate() { if (Containers == null) { throw new ValidationException(ValidationRules.CannotBeNull, "Containers"); } if (OsType == null) { throw new ValidationException(ValidationRules.CannotBeNull, "OsType"); } if (Containers != null) { foreach (var element in Containers) { if (element != null) { element.Validate(); } } } if (ImageRegistryCredentials != null) { foreach (var element1 in ImageRegistryCredentials) { if (element1 != null) { element1.Validate(); } } } if (IpAddress != null) { IpAddress.Validate(); } if (Volumes != null) { foreach (var element2 in Volumes) { if (element2 != null) { element2.Validate(); } } } if (Diagnostics != null) { Diagnostics.Validate(); } if (NetworkProfile != null) { NetworkProfile.Validate(); } if (DnsConfig != null) { DnsConfig.Validate(); } }
/// <summary> /// Validate the object. /// </summary> /// <exception cref="ValidationException"> /// Thrown if validation fails /// </exception> public override void Validate() { if (Containers == null) { throw new ValidationException(ValidationRules.CannotBeNull, "Containers"); } if (OsType == null) { throw new ValidationException(ValidationRules.CannotBeNull, "OsType"); } if (Containers != null) { foreach (var element in Containers) { if (element != null) { element.Validate(); } } } if (ImageRegistryCredentials != null) { foreach (var element1 in ImageRegistryCredentials) { if (element1 != null) { element1.Validate(); } } } if (IpAddress != null) { IpAddress.Validate(); } if (Volumes != null) { foreach (var element2 in Volumes) { if (element2 != null) { element2.Validate(); } } } }
/// <summary> /// Validate the object. /// </summary> /// <exception cref="ValidationException"> /// Thrown if validation fails /// </exception> public virtual void Validate() { if (Containers != null) { foreach (var element in Containers) { if (element != null) { element.Validate(); } } } if (ImageRegistryCredentials != null) { foreach (var element1 in ImageRegistryCredentials) { if (element1 != null) { element1.Validate(); } } } if (IpAddress != null) { IpAddress.Validate(); } if (Volumes != null) { foreach (var element2 in Volumes) { if (element2 != null) { element2.Validate(); } } } }