summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2008-09-13 18:15:20 -0700
committerAndrew <andrewarnott@gmail.com>2008-09-13 18:15:20 -0700
commitc1d035b2d138dcd915f17f187edb458ef1b541a6 (patch)
treeeaaba9ad0e6c8d0be8efe4b33d98d6cc91e55a0e
parent76cf7ef65fb66bfd44f9672f50e1901daa91126f (diff)
downloadDotNetOpenAuth-c1d035b2d138dcd915f17f187edb458ef1b541a6.zip
DotNetOpenAuth-c1d035b2d138dcd915f17f187edb458ef1b541a6.tar.gz
DotNetOpenAuth-c1d035b2d138dcd915f17f187edb458ef1b541a6.tar.bz2
Stylecop fixes.
-rw-r--r--src/DotNetOAuth.Test/Mocks/TestDirectedMessage.cs14
-rw-r--r--src/DotNetOAuth/Messaging/Bindings/StandardExpirationBindingElement.cs12
-rw-r--r--src/DotNetOAuth/Messaging/UnprotectedMessageException.cs15
3 files changed, 32 insertions, 9 deletions
diff --git a/src/DotNetOAuth.Test/Mocks/TestDirectedMessage.cs b/src/DotNetOAuth.Test/Mocks/TestDirectedMessage.cs
index 30a290d..7add28b 100644
--- a/src/DotNetOAuth.Test/Mocks/TestDirectedMessage.cs
+++ b/src/DotNetOAuth.Test/Mocks/TestDirectedMessage.cs
@@ -32,7 +32,7 @@ namespace DotNetOAuth.Test.Mocks {
#endregion
- #region IProtocolMessage Members
+ #region IProtocolMessage Properties
Version IProtocolMessage.ProtocolVersion {
get { return new Version(1, 0); }
@@ -46,6 +46,14 @@ namespace DotNetOAuth.Test.Mocks {
get { return this.transport; }
}
+ #endregion
+
+ protected virtual MessageProtection RequiredProtection {
+ get { return MessageProtection.None; }
+ }
+
+ #region IProtocolMessage Methods
+
void IProtocolMessage.EnsureValidMessage() {
if (this.EmptyMember != null || this.Age < 0) {
throw new ProtocolException();
@@ -53,9 +61,5 @@ namespace DotNetOAuth.Test.Mocks {
}
#endregion
-
- protected virtual MessageProtection RequiredProtection {
- get { return MessageProtection.None; }
- }
}
}
diff --git a/src/DotNetOAuth/Messaging/Bindings/StandardExpirationBindingElement.cs b/src/DotNetOAuth/Messaging/Bindings/StandardExpirationBindingElement.cs
index ef93e0d..25a24f5 100644
--- a/src/DotNetOAuth/Messaging/Bindings/StandardExpirationBindingElement.cs
+++ b/src/DotNetOAuth/Messaging/Bindings/StandardExpirationBindingElement.cs
@@ -71,6 +71,10 @@ namespace DotNetOAuth.Messaging.Bindings {
/// Sets the timestamp on an outgoing message.
/// </summary>
/// <param name="message">The outgoing message.</param>
+ /// <returns>
+ /// True if the <paramref name="message"/> applied to this binding element
+ /// and the operation was successful. False otherwise.
+ /// </returns>
bool IChannelBindingElement.PrepareMessageForSending(IProtocolMessage message) {
IExpiringProtocolMessage expiringMessage = message as IExpiringProtocolMessage;
if (expiringMessage != null) {
@@ -85,7 +89,15 @@ namespace DotNetOAuth.Messaging.Bindings {
/// Reads the timestamp on a message and throws an exception if the message is too old.
/// </summary>
/// <param name="message">The incoming message.</param>
+ /// <returns>
+ /// True if the <paramref name="message"/> applied to this binding element
+ /// and the operation was successful. False if the operation did not apply to this message.
+ /// </returns>
/// <exception cref="ExpiredMessageException">Thrown if the given message has already expired.</exception>
+ /// <exception cref="ProtocolException">
+ /// Thrown when the binding element rules indicate that this message is invalid and should
+ /// NOT be processed.
+ /// </exception>
bool IChannelBindingElement.PrepareMessageForReceiving(IProtocolMessage message) {
IExpiringProtocolMessage expiringMessage = message as IExpiringProtocolMessage;
if (expiringMessage != null) {
diff --git a/src/DotNetOAuth/Messaging/UnprotectedMessageException.cs b/src/DotNetOAuth/Messaging/UnprotectedMessageException.cs
index f05bf88..45a6a41 100644
--- a/src/DotNetOAuth/Messaging/UnprotectedMessageException.cs
+++ b/src/DotNetOAuth/Messaging/UnprotectedMessageException.cs
@@ -1,10 +1,17 @@
-namespace DotNetOAuth.Messaging {
+//-----------------------------------------------------------------------
+// <copyright file="UnprotectedMessageException.cs" company="Andrew Arnott">
+// Copyright (c) Andrew Arnott. All rights reserved.
+// </copyright>
+//-----------------------------------------------------------------------
+
+namespace DotNetOAuth.Messaging {
using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
using System.Globalization;
+ /// <summary>
+ /// An exception thrown when messages cannot receive all the protections they require.
+ /// </summary>
+ [Serializable]
internal class UnprotectedMessageException : ProtocolException {
/// <summary>
/// Initializes a new instance of the <see cref="UnprotectedMessageException"/> class.