private static void EvaluateResponse(Response response, HttpResponseBase httpResponse)
 {
     response.MatchAction(
         content: x => httpResponse.Raw(x.Content, x.ContentType),
         xdoc: x => httpResponse.XDocument(x.Content, x.ContentType),
         redirect: x => httpResponse.Redirect(x.Location));
 }
Example #2
0
 public static void XElement(this HttpResponseBase response, XElement e, string contentType)
 {
     if (response == null)
     {
         throw new ArgumentNullException("response");
     }
     if (e == null)
     {
         throw new ArgumentNullException("e");
     }
     response.XDocument(new XDocument(e), contentType);
 }
Example #3
0
 public static void Html(this HttpResponseBase response, XDocument doc)
 {
     response.XDocument(doc, textHtml);
 }