/// <summary> /// Updates the current instance to match the information in <paramref name="serverImage"/>. /// </summary> /// <remarks> /// <note type="implement"> /// This method should be overridden in derived types to ensure all properties /// for the current instance are updated. /// </note> /// </remarks> /// <param name="serverImage">The updated information for the current image.</param> /// <exception cref="ArgumentNullException">If <paramref name="serverImage"/> is <see langword="null"/>.</exception> protected virtual void UpdateThis(SimpleServerImage serverImage) { if (serverImage == null) { throw new ArgumentNullException("serverImage"); } Id = serverImage.Id; Links = serverImage.Links; Name = serverImage.Name; }
protected virtual void UpdateThis(SimpleServerImage serverImage) { if (serverImage == null) { return; } Id = serverImage.Id; Links = serverImage.Links; Name = serverImage.Name; }
protected override void UpdateThis(SimpleServerImage serverImage) { base.UpdateThis(serverImage); var details = serverImage as ServerImage; if (details == null) { return; } DiskConfig = details.DiskConfig; Status = details.Status; Created = details.Created; Progress = details.Progress; Updated = details.Updated; MinDisk = details.MinDisk; MinRAM = details.MinRAM; }
/// <inheritdoc/> protected override void UpdateThis(SimpleServerImage serverImage) { if (serverImage == null) { throw new ArgumentNullException("serverImage"); } base.UpdateThis(serverImage); var details = serverImage as ServerImage; if (details == null) { return; } DiskConfig = details.DiskConfig; Status = details.Status; Created = details.Created; Progress = details.Progress; Updated = details.Updated; MinDisk = details.MinDisk; MinRAM = details.MinRAM; }