diff options
Diffstat (limited to 'src/DotNetOAuth')
-rw-r--r-- | src/DotNetOAuth/Logger.cs | 2 | ||||
-rw-r--r-- | src/DotNetOAuth/Loggers/Log4NetLogger.cs | 2 | ||||
-rw-r--r-- | src/DotNetOAuth/Messaging/Channel.cs | 2 | ||||
-rw-r--r-- | src/DotNetOAuth/Messaging/IDirectedProtocolMessage.cs | 7 | ||||
-rw-r--r-- | src/DotNetOAuth/Messaging/MessagingStrings.Designer.cs | 9 | ||||
-rw-r--r-- | src/DotNetOAuth/Messaging/MessagingStrings.resx | 3 | ||||
-rw-r--r-- | src/DotNetOAuth/Protocol.cs | 10 |
7 files changed, 22 insertions, 13 deletions
diff --git a/src/DotNetOAuth/Logger.cs b/src/DotNetOAuth/Logger.cs index 844dcc6..206efca 100644 --- a/src/DotNetOAuth/Logger.cs +++ b/src/DotNetOAuth/Logger.cs @@ -11,7 +11,7 @@ namespace DotNetOAuth { using log4net.Core;
/// <summary>
- /// A general logger for the entire YOURLIBNAME library.
+ /// A general logger for the entire DotNetOAuth library.
/// </summary>
/// <remarks>
/// Because this logger is intended for use with non-localized strings, the
diff --git a/src/DotNetOAuth/Loggers/Log4NetLogger.cs b/src/DotNetOAuth/Loggers/Log4NetLogger.cs index 98fc8f2..352f8c2 100644 --- a/src/DotNetOAuth/Loggers/Log4NetLogger.cs +++ b/src/DotNetOAuth/Loggers/Log4NetLogger.cs @@ -205,7 +205,7 @@ namespace DotNetOAuth.Loggers { /// </summary>
/// <returns>The created <see cref="ILog"/> instance.</returns>
private static ILog CreateLogger() {
- return new Log4NetLogger(log4net.LogManager.GetLogger("YOURLIBNAME"));
+ return new Log4NetLogger(log4net.LogManager.GetLogger("DotNetOAuth"));
}
}
}
diff --git a/src/DotNetOAuth/Messaging/Channel.cs b/src/DotNetOAuth/Messaging/Channel.cs index 825f018..40261b1 100644 --- a/src/DotNetOAuth/Messaging/Channel.cs +++ b/src/DotNetOAuth/Messaging/Channel.cs @@ -128,7 +128,7 @@ namespace DotNetOAuth.Messaging { this.ReportErrorToUser(exception);
}
} else {
- throw new InvalidOperationException();
+ throw new InvalidOperationException(MessagingStrings.DirectedMessageMissingRecipient);
}
}
}
diff --git a/src/DotNetOAuth/Messaging/IDirectedProtocolMessage.cs b/src/DotNetOAuth/Messaging/IDirectedProtocolMessage.cs index 82ee08e..bebd303 100644 --- a/src/DotNetOAuth/Messaging/IDirectedProtocolMessage.cs +++ b/src/DotNetOAuth/Messaging/IDirectedProtocolMessage.cs @@ -13,11 +13,8 @@ namespace DotNetOAuth.Messaging { /// </summary>
internal interface IDirectedProtocolMessage : IProtocolMessage {
/// <summary>
- /// Gets or sets the URL of the intended receiver of this message.
+ /// Gets the URL of the intended receiver of this message.
/// </summary>
- Uri Recipient {
- get;
- set;
- }
+ Uri Recipient { get; }
}
}
diff --git a/src/DotNetOAuth/Messaging/MessagingStrings.Designer.cs b/src/DotNetOAuth/Messaging/MessagingStrings.Designer.cs index 60aadfb..98e8cc6 100644 --- a/src/DotNetOAuth/Messaging/MessagingStrings.Designer.cs +++ b/src/DotNetOAuth/Messaging/MessagingStrings.Designer.cs @@ -70,6 +70,15 @@ namespace DotNetOAuth.Messaging { }
/// <summary>
+ /// Looks up a localized string similar to The directed message's Recipient property must not be null..
+ /// </summary>
+ internal static string DirectedMessageMissingRecipient {
+ get {
+ return ResourceManager.GetString("DirectedMessageMissingRecipient", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Looks up a localized string similar to Error occurred while sending a direct message or gettings the response..
/// </summary>
internal static string ErrorInRequestReplyMessage {
diff --git a/src/DotNetOAuth/Messaging/MessagingStrings.resx b/src/DotNetOAuth/Messaging/MessagingStrings.resx index 4602058..2125e15 100644 --- a/src/DotNetOAuth/Messaging/MessagingStrings.resx +++ b/src/DotNetOAuth/Messaging/MessagingStrings.resx @@ -120,6 +120,9 @@ <data name="DerivedTypeNotExpected" xml:space="preserve">
<value>An instance of type {0} was expected, but received unexpected derived type {1}.</value>
</data>
+ <data name="DirectedMessageMissingRecipient" xml:space="preserve">
+ <value>The directed message's Recipient property must not be null.</value>
+ </data>
<data name="ErrorInRequestReplyMessage" xml:space="preserve">
<value>Error occurred while sending a direct message or gettings the response.</value>
</data>
diff --git a/src/DotNetOAuth/Protocol.cs b/src/DotNetOAuth/Protocol.cs index be76e2a..f3dc3b6 100644 --- a/src/DotNetOAuth/Protocol.cs +++ b/src/DotNetOAuth/Protocol.cs @@ -20,11 +20,6 @@ namespace DotNetOAuth { /// </remarks>
internal class Protocol {
/// <summary>
- /// Gets the default <see cref="Protocol"/> instance.
- /// </summary>
- internal static Protocol Default { get { return V10; } }
-
- /// <summary>
/// The namespace to use for V1.0 of the protocol.
/// </summary>
internal const string DataContractNamespaceV10 = "http://oauth.net/core/1.0/";
@@ -52,6 +47,11 @@ namespace DotNetOAuth { private string authorizationHeaderScheme = "OAuth";
/// <summary>
+ /// Gets the default <see cref="Protocol"/> instance.
+ /// </summary>
+ internal static Protocol Default { get { return V10; } }
+
+ /// <summary>
/// Gets the namespace to use for this version of the protocol.
/// </summary>
internal string DataContractNamespace {
|