private GetImageSizeResult(bool isSuccessful, GetImageSizeError error, int width, int height) { IsSuccessful = isSuccessful; Error = error; Width = width; Height = height; }
private ObjectResult GetImageSaveErrorResult(GetImageSizeError error) { switch (error) { case GetImageSizeError.InvalidImage: { var apiErrorDataContract = new ApiErrorDataContract(SaveImageApiErrorCodes.InvalidImage); return(BadRequest(apiErrorDataContract)); } default: throw new ArgumentOutOfRangeException(nameof(error), error, null); } }