/// <summary> /// Initializes a new instance of the <see cref="VolumeEnteredErrorStateException"/> with the /// specified volume state. /// </summary> /// <param name="status">The erroneous volume state.</param> /// <exception cref="ArgumentNullException">If <paramref name="status"/> is <c>null</c>.</exception> public VolumeEnteredErrorStateException(VolumeState status) : base(string.Format("The volume entered an error state: '{0}'", status)) { if (status == null) throw new ArgumentNullException("status"); _state.Status = status.Name; #if !NET35 SerializeObjectState += (ex, args) => args.AddSerializedState(_state); #endif }
/// <inheritdoc/> protected override VolumeState FromName(string name) { return(VolumeState.FromName(name)); }