Пример #1
0
 /// <summary>Gets the content type.</summary>
 public static InternetMediaType GetContentType(this HttpResponseBase reponse)
 {
     Guard.NotNull(reponse, "reponse");
     return(InternetMediaType.Parse(reponse.ContentType));
 }
Пример #2
0
 /// <summary>Sets the content type.</summary>
 public static void SetContentType(this HttpResponseBase reponse, InternetMediaType mediaType)
 {
     Guard.NotNull(reponse, "reponse");
     reponse.ContentType = mediaType.ToString();
 }
Пример #3
0
 /// <summary>Sets the content type.</summary>
 public static void SetContentType(this HttpRequestBase request, InternetMediaType mediaType)
 {
     Guard.NotNull(request, "request");
     request.ContentType = mediaType.ToString();
 }
Пример #4
0
 /// <summary>Gets the content type.</summary>
 public static InternetMediaType GetContentType(this HttpRequestBase request)
 {
     Guard.NotNull(request, "request");
     return(InternetMediaType.Parse(request.ContentType));
 }
Пример #5
0
 public static void SetContentType(this HttpResponse reponse, InternetMediaType mediaType)
 {
     Guard.NotNull(reponse, "reponse");
     new HttpResponseWrapper(reponse).SetContentType(mediaType);
 }
Пример #6
0
 public static void SetContentType(this HttpRequest request, InternetMediaType mediaType)
 {
     Guard.NotNull(request, "request");
     new HttpRequestWrapper(request).SetContentType(mediaType);
 }
Пример #7
0
 partial void OnReadXml(InternetMediaType other);