summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.Core/Messaging/Channel.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2012-03-10 10:42:01 -0800
committerAndrew Arnott <andrewarnott@gmail.com>2012-03-10 10:42:01 -0800
commit5bd70111d5740844656aaed12206c9f28dd25923 (patch)
tree7f25810c5e6029dfdc0b491c58393fc8f76fcaf1 /src/DotNetOpenAuth.Core/Messaging/Channel.cs
parent6e68095c020f88f6c61b3a76f1fa885ead1e7f15 (diff)
downloadDotNetOpenAuth-5bd70111d5740844656aaed12206c9f28dd25923.zip
DotNetOpenAuth-5bd70111d5740844656aaed12206c9f28dd25923.tar.gz
DotNetOpenAuth-5bd70111d5740844656aaed12206c9f28dd25923.tar.bz2
FxCop fixes and suppressions.
Diffstat (limited to 'src/DotNetOpenAuth.Core/Messaging/Channel.cs')
-rw-r--r--src/DotNetOpenAuth.Core/Messaging/Channel.cs33
1 files changed, 17 insertions, 16 deletions
diff --git a/src/DotNetOpenAuth.Core/Messaging/Channel.cs b/src/DotNetOpenAuth.Core/Messaging/Channel.cs
index 2e4da38..16e39d3 100644
--- a/src/DotNetOpenAuth.Core/Messaging/Channel.cs
+++ b/src/DotNetOpenAuth.Core/Messaging/Channel.cs
@@ -602,6 +602,7 @@ namespace DotNetOpenAuth.Messaging {
/// Gets the HTTP context for the current HTTP request.
/// </summary>
/// <returns>An HttpContextBase instance.</returns>
+ [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate", Justification = "Allocates memory")]
protected internal virtual HttpContextBase GetHttpContext() {
Requires.ValidState(HttpContext.Current != null, MessagingStrings.HttpContextRequired);
return new HttpContextWrapper(HttpContext.Current);
@@ -644,6 +645,22 @@ namespace DotNetOpenAuth.Messaging {
}
/// <summary>
+ /// Applies message prescribed HTTP response headers to an outgoing web response.
+ /// </summary>
+ /// <param name="message">The message.</param>
+ /// <param name="response">The HTTP response.</param>
+ protected static void ApplyMessageTemplate(IMessage message, OutgoingWebResponse response) {
+ Requires.NotNull(message, "message");
+ var httpMessage = message as IHttpDirectResponse;
+ if (httpMessage != null) {
+ response.Status = httpMessage.HttpStatusCode;
+ foreach (string headerName in httpMessage.Headers) {
+ response.Headers.Add(headerName, httpMessage.Headers[headerName]);
+ }
+ }
+ }
+
+ /// <summary>
/// Releases unmanaged and - optionally - managed resources
/// </summary>
/// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
@@ -1044,22 +1061,6 @@ namespace DotNetOpenAuth.Messaging {
}
/// <summary>
- /// Applies message prescribed HTTP response headers to an outgoing web response.
- /// </summary>
- /// <param name="message">The message.</param>
- /// <param name="response">The HTTP response.</param>
- protected void ApplyMessageTemplate(IMessage message, OutgoingWebResponse response) {
- Requires.NotNull(message, "message");
- var httpMessage = message as IHttpDirectResponse;
- if (httpMessage != null) {
- response.Status = httpMessage.HttpStatusCode;
- foreach (string headerName in httpMessage.Headers) {
- response.Headers.Add(headerName, httpMessage.Headers[headerName]);
- }
- }
- }
-
- /// <summary>
/// Prepares to send a request to the Service Provider as the query string in a GET request.
/// </summary>
/// <param name="requestMessage">The message to be transmitted to the ServiceProvider.</param>