Beispiel #1
0
 /// <summary>Gets the content type.</summary>
 public static InternetMediaType GetContentType(this HttpResponseBase reponse)
 {
     Guard.NotNull(reponse, "reponse");
     return(InternetMediaType.Parse(reponse.ContentType));
 }
Beispiel #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();
 }
Beispiel #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();
 }
Beispiel #4
0
 /// <summary>Gets the content type.</summary>
 public static InternetMediaType GetContentType(this HttpRequestBase request)
 {
     Guard.NotNull(request, "request");
     return(InternetMediaType.Parse(request.ContentType));
 }
Beispiel #5
0
 public static void SetContentType(this HttpResponse reponse, InternetMediaType mediaType)
 {
     Guard.NotNull(reponse, "reponse");
     new HttpResponseWrapper(reponse).SetContentType(mediaType);
 }
Beispiel #6
0
 public static void SetContentType(this HttpRequest request, InternetMediaType mediaType)
 {
     Guard.NotNull(request, "request");
     new HttpRequestWrapper(request).SetContentType(mediaType);
 }
Beispiel #7
0
 partial void OnReadXml(InternetMediaType other);