diff options
Diffstat (limited to 'src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs')
-rw-r--r-- | src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs b/src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs index 4dfddae..7be618c 100644 --- a/src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs +++ b/src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs @@ -24,7 +24,6 @@ namespace DotNetOpenAuth.Messaging { using System.Threading; using System.Threading.Tasks; using System.Web; - using System.Web.Mvc; using System.Xml; using DotNetOpenAuth.Messaging.Bindings; using DotNetOpenAuth.Messaging.Reflection; @@ -411,16 +410,6 @@ namespace DotNetOpenAuth.Messaging { } /// <summary> - /// Wraps a response message as an MVC <see cref="ActionResult"/> so it can be conveniently returned from an MVC controller's action method. - /// </summary> - /// <param name="response">The response message.</param> - /// <returns>An <see cref="ActionResult"/> instance.</returns> - public static ActionResult AsActionResult(this HttpResponseMessage response) { - Requires.NotNull(response, "response"); - return new HttpResponseMessageActionResult(response); - } - - /// <summary> /// Wraps an instance of <see cref="HttpRequestBase"/> as an <see cref="HttpRequestMessage"/> instance. /// </summary> /// <param name="request">The request.</param> @@ -2043,33 +2032,5 @@ namespace DotNetOpenAuth.Messaging { #endregion } - - /// <summary> - /// An MVC <see cref="ActionResult"/> that wraps an <see cref="HttpResponseMessage"/> - /// </summary> - private class HttpResponseMessageActionResult : ActionResult { - /// <summary> - /// The wrapped response. - /// </summary> - private readonly HttpResponseMessage response; - - /// <summary> - /// Initializes a new instance of the <see cref="HttpResponseMessageActionResult"/> class. - /// </summary> - /// <param name="response">The response.</param> - internal HttpResponseMessageActionResult(HttpResponseMessage response) { - Requires.NotNull(response, "response"); - this.response = response; - } - - /// <summary> - /// Enables processing of the result of an action method by a custom type that inherits from the <see cref="T:System.Web.Mvc.ActionResult" /> class. - /// </summary> - /// <param name="context">The context in which the result is executed. The context information includes the controller, HTTP content, request context, and route data.</param> - public override void ExecuteResult(ControllerContext context) { - // Sadly, MVC doesn't support writing to the response stream asynchronously. - this.response.SendAsync(context.HttpContext).GetAwaiter().GetResult(); - } - } } } |