public ViewResponse(HttpResponceCode statusCode, IView view) { this.ValidateStatusCode(statusCode); this.view = view; this.StatusCode = statusCode; }
private void ValidateStatusCode(HttpResponceCode statusCode) { var statusCodeNumber = (int)statusCode; if (statusCodeNumber > 300 && statusCodeNumber < 399) { throw new InvalidResponseException("Invalid status code for correct response."); } }