public FallbackResponseHandler(FallbackResponse response)
{
if (!Enum.IsDefined(typeof(FallbackResponse), response))
{
throw new ArgumentOutOfRangeException("response");
}
// Fallback to 503 Service Unavailable when undefined
response = response == FallbackResponse.Undefined ? FallbackResponse.Http503ServiceUnavailable : response;
_statusCode = (int)response;
_statusCodeDescription = HttpStatusCodes.GetStatusDescription(_statusCode);
_origin = response == FallbackResponse.Http404NotFound
? HttpResponseOrigin.NotFoundResponse
: HttpResponseOrigin.ServiceUnavailable;
}