/// <summary> /// Gets the description of the specified HTTP status <paramref name="code"/>. /// </summary> /// <returns> /// A <see cref="string"/> that represents the description of the HTTP status code. /// </returns> /// <param name="code"> /// One of <see cref="HttpStatusCode"/> enum values, indicates the HTTP status codes. /// </param> public static string GetDescription(this HttpStatusCode code) { return(((int)code).GetStatusDescription()); }
internal static void Close(this HttpListenerResponse response, HttpStatusCode code) { response.StatusCode = (int)code; response.OutputStream.Close(); }