Ejemplo n.º 1
0
        public Response SetStatus(HttpStatusCode statusCode, string description = null)
        {
            var status = statusCode.As <int>().ToString();

            Status = description.IsEmpty() ? status : "{0} {1}".ToFormat(status, description);
            return(this);
        }
Ejemplo n.º 2
0
 public void WriteResponseCode(HttpStatusCode status)
 {
     _response.Status = status.As <int>().ToString();
 }
Ejemplo n.º 3
0
 public void WriteResponseCode(HttpStatusCode status, string description = null)
 {
     _environment[OwinConstants.ResponseStatusCodeKey] = status.As<int>();
     _environment[OwinConstants.ResponseReasonPhraseKey] = description;
 }
Ejemplo n.º 4
0
 public void WriteResponseCode(HttpStatusCode status, string description = null)
 {
     _environment[OwinConstants.ResponseStatusCodeKey]   = status.As <int>();
     _environment[OwinConstants.ResponseReasonPhraseKey] = description;
 }
Ejemplo n.º 5
0
 public Response SetStatus(HttpStatusCode statusCode, string description = null)
 {
     var status = statusCode.As<int>().ToString();
     Status = description.IsEmpty() ? status : "{0} {1}".ToFormat(status, description);
     return this;
 }
Ejemplo n.º 6
0
 public void WriteResponseCode(HttpStatusCode status)
 {
     _response.Status = status.As<int>().ToString();
 }
Ejemplo n.º 7
0
 public override string ToString()
 {
     return(_description.IsEmpty()
                ? _status.As <int>().ToString()
                : "{0} {1}".ToFormat(_status.As <int>(), _description));
 }