private CommandRequestStatus(CommandIds commandId, CommandRequestStatusCode statusCode, DateTime?requestedTimeStamp, DateTime?pendingOrRefusedTimeStamp, DateTime?cancellationRequestedTimeStamp, DateTime?completedFaultingOrCancelledTimeStamp, string finalStatusExplanation) { CommandId = commandId; StatusCode = statusCode; RequestedTimeStamp = requestedTimeStamp; PendingOrRefusedTimeStamp = pendingOrRefusedTimeStamp; CancellationRequestedTimeStamp = cancellationRequestedTimeStamp; CompletedFaultingOrCancelledTimeStamp = completedFaultingOrCancelledTimeStamp; _finalStatusExplanation = finalStatusExplanation ?? string.Empty; }
public CommandRequestStatus(CommandIds whichCommand) { CommandId = whichCommand.IsValueDefined() ? whichCommand : throw new ArgumentOutOfRangeException(nameof(whichCommand), whichCommand, $"The supplied value [{whichCommand}] is not a defined value of the [{typeof(CommandIds).Name}] enumeration."); StatusCode = CommandRequestStatusCode.Nil; RequestedTimeStamp = null; PendingOrRefusedTimeStamp = null; CompletedFaultingOrCancelledTimeStamp = null; CancellationRequestedTimeStamp = null; _finalStatusExplanation = string.Empty; }