PageRenderTime 21ms CodeModel.GetById 12ms app.highlight 4ms RepoModel.GetById 2ms app.codeStats 0ms

/WCFWebApi/src/Microsoft.Net.Http.Formatting/System/Net/Http/HttpUnsortedResponse.cs

#
C# | 55 lines | 16 code | 6 blank | 33 comment | 0 complexity | 47fa3803ec046dc3e610e78b4cb2268b MD5 | raw file
 1// <copyright>
 2//   Copyright (c) Microsoft Corporation.  All rights reserved.
 3// </copyright>
 4
 5namespace System.Net.Http
 6{
 7    using System;
 8    using System.Net.Http.Headers;
 9
10    /// <summary>
11    /// Represents the HTTP Status Line and header parameters parsed by <see cref="HttpStatusLineParser"/>
12    /// and <see cref="HttpResponseHeaderParser"/>.
13    /// </summary>
14    internal class HttpUnsortedResponse
15    {
16        /// <summary>
17        /// Initializes a new instance of the <see cref="HttpUnsortedRequest"/> class.
18        /// </summary>
19        public HttpUnsortedResponse()
20        {
21            // Collection of unsorted headers. Later we will sort it into the appropriate
22            // HttpContentHeaders, HttpRequestHeaders, and HttpResponseHeaders.
23            this.HttpHeaders = new HttpUnsortedHeaders();
24        }
25
26        /// <summary>
27        /// Gets or sets the HTTP version.
28        /// </summary>
29        /// <value>
30        /// The HTTP version.
31        /// </value>
32        public Version Version { get; set; }
33
34        /// <summary>
35        /// Gets or sets the <see cref="HttpStatusCode"/>
36        /// </summary>
37        /// <value>
38        /// The HTTP status code
39        /// </value>
40        public HttpStatusCode StatusCode { get; set; }
41
42        /// <summary>
43        /// Gets or sets the HTTP reason phrase
44        /// </summary>
45        /// <value>
46        /// The response reason phrase
47        /// </value>
48        public string ReasonPhrase { get; set; }
49
50        /// <summary>
51        /// Gets the unsorted HTTP request headers.
52        /// </summary>
53        public HttpHeaders HttpHeaders { get; private set; }
54    }
55}