diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2013-10-19 18:08:25 -0700 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2013-10-19 18:08:25 -0700 |
commit | 9fac617a455acffa4f78dc5cfe7415157e12a63c (patch) | |
tree | 47a4a7da8a8a61da203bb4f0714f179d1b572899 /src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs | |
parent | dab0acee2544e23f36b84b443af0d160adb4bc49 (diff) | |
download | DotNetOpenAuth-9fac617a455acffa4f78dc5cfe7415157e12a63c.zip DotNetOpenAuth-9fac617a455acffa4f78dc5cfe7415157e12a63c.tar.gz DotNetOpenAuth-9fac617a455acffa4f78dc5cfe7415157e12a63c.tar.bz2 |
Moves all MVC dependencies from core assemblies to a separate assembly.
I still need to add DNOA.Mvc to some build and package authoring.
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(); - } - } } } |