summaryrefslogtreecommitdiffstats
path: root/src/DotNetOAuth/Messaging
diff options
context:
space:
mode:
Diffstat (limited to 'src/DotNetOAuth/Messaging')
-rw-r--r--src/DotNetOAuth/Messaging/MessageReceivingEndpoint.cs5
-rw-r--r--src/DotNetOAuth/Messaging/MessagingStrings.Designer.cs9
-rw-r--r--src/DotNetOAuth/Messaging/MessagingStrings.resx3
3 files changed, 17 insertions, 0 deletions
diff --git a/src/DotNetOAuth/Messaging/MessageReceivingEndpoint.cs b/src/DotNetOAuth/Messaging/MessageReceivingEndpoint.cs
index 9ad749b..31c79ca 100644
--- a/src/DotNetOAuth/Messaging/MessageReceivingEndpoint.cs
+++ b/src/DotNetOAuth/Messaging/MessageReceivingEndpoint.cs
@@ -6,10 +6,12 @@
namespace DotNetOAuth.Messaging {
using System;
+ using System.Diagnostics;
/// <summary>
/// An immutable description of a URL that receives messages.
/// </summary>
+ [DebuggerDisplay("{AllowedMethods} {Location}")]
public class MessageReceivingEndpoint {
/// <summary>
/// Initializes a new instance of the <see cref="MessageReceivingEndpoint"/> class.
@@ -31,6 +33,9 @@ namespace DotNetOAuth.Messaging {
if (method == HttpDeliveryMethod.None) {
throw new ArgumentOutOfRangeException("method");
}
+ if ((method & (HttpDeliveryMethod.PostRequest | HttpDeliveryMethod.GetRequest)) == 0) {
+ throw new ArgumentOutOfRangeException("method", MessagingStrings.GetOrPostFlagsRequired);
+ }
this.Location = location;
this.AllowedMethods = method;
diff --git a/src/DotNetOAuth/Messaging/MessagingStrings.Designer.cs b/src/DotNetOAuth/Messaging/MessagingStrings.Designer.cs
index 5fd839a..c002ecd 100644
--- a/src/DotNetOAuth/Messaging/MessagingStrings.Designer.cs
+++ b/src/DotNetOAuth/Messaging/MessagingStrings.Designer.cs
@@ -151,6 +151,15 @@ namespace DotNetOAuth.Messaging {
}
/// <summary>
+ /// Looks up a localized string similar to At least one of GET or POST flags must be present..
+ /// </summary>
+ internal static string GetOrPostFlagsRequired {
+ get {
+ return ResourceManager.GetString("GetOrPostFlagsRequired", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Looks up a localized string similar to This method requires a current HttpContext. Alternatively, use an overload of this method that allows you to pass in information without an HttpContext..
/// </summary>
internal static string HttpContextRequired {
diff --git a/src/DotNetOAuth/Messaging/MessagingStrings.resx b/src/DotNetOAuth/Messaging/MessagingStrings.resx
index 66db7f4..255938c 100644
--- a/src/DotNetOAuth/Messaging/MessagingStrings.resx
+++ b/src/DotNetOAuth/Messaging/MessagingStrings.resx
@@ -147,6 +147,9 @@
<data name="ExpiredMessage" xml:space="preserve">
<value>The message expired at {0} and it is now {1}.</value>
</data>
+ <data name="GetOrPostFlagsRequired" xml:space="preserve">
+ <value>At least one of GET or POST flags must be present.</value>
+ </data>
<data name="HttpContextRequired" xml:space="preserve">
<value>This method requires a current HttpContext. Alternatively, use an overload of this method that allows you to pass in information without an HttpContext.</value>
</data>