/// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (ImageSourceRegistry == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "ImageSourceRegistry");
     }
     if (ImageSourceRegistry != null)
     {
         ImageSourceRegistry.Validate();
     }
 }
 /// <summary>
 /// Initializes a new instance of the ContainerSettings class.
 /// </summary>
 /// <param name="imageSourceRegistry">Image source registry.</param>
 /// <param name="shmSize">/dev/shm size.</param>
 public ContainerSettings(ImageSourceRegistry imageSourceRegistry, string shmSize = default(string))
 {
     ImageSourceRegistry = imageSourceRegistry;
     ShmSize             = shmSize;
     CustomInit();
 }