summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-07-28 21:19:58 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2009-07-28 21:19:58 -0700
commite36299f39476c56977c39700067ed8f6ae0a4e49 (patch)
treefebf2f16732ec183a40462deed53d893b27beec2 /src
parent733fd208b1006b7a974519f46c766efab39acc5c (diff)
downloadDotNetOpenAuth-e36299f39476c56977c39700067ed8f6ae0a4e49.zip
DotNetOpenAuth-e36299f39476c56977c39700067ed8f6ae0a4e49.tar.gz
DotNetOpenAuth-e36299f39476c56977c39700067ed8f6ae0a4e49.tar.bz2
Fixed some contracts that were using string.Format, which is not allowed.
Diffstat (limited to 'src')
-rw-r--r--src/DotNetOpenAuth/Messaging/IDirectWebRequestHandler.cs6
-rw-r--r--src/DotNetOpenAuth/Messaging/MessagingStrings.Designer.cs2
-rw-r--r--src/DotNetOpenAuth/Messaging/MessagingStrings.resx2
-rw-r--r--src/DotNetOpenAuth/OpenId/OpenIdStrings.Designer.cs2
-rw-r--r--src/DotNetOpenAuth/OpenId/OpenIdStrings.resx2
-rw-r--r--src/DotNetOpenAuth/OpenId/RelyingParty/IAuthenticationResponse.cs6
-rw-r--r--src/DotNetOpenAuth/OpenId/RelyingParty/IProviderEndpoint.cs3
-rw-r--r--src/DotNetOpenAuth/OpenId/RelyingParty/IXrdsProviderEndpointContract.cs3
-rw-r--r--src/DotNetOpenAuth/OpenId/XriIdentifier.cs2
9 files changed, 17 insertions, 11 deletions
diff --git a/src/DotNetOpenAuth/Messaging/IDirectWebRequestHandler.cs b/src/DotNetOpenAuth/Messaging/IDirectWebRequestHandler.cs
index a0ebff2..af03ba9 100644
--- a/src/DotNetOpenAuth/Messaging/IDirectWebRequestHandler.cs
+++ b/src/DotNetOpenAuth/Messaging/IDirectWebRequestHandler.cs
@@ -165,7 +165,8 @@ namespace DotNetOpenAuth.Messaging {
/// </remarks>
Stream IDirectWebRequestHandler.GetRequestStream(HttpWebRequest request, DirectWebRequestOptions options) {
Contract.Requires<ArgumentNullException>(request != null);
- Contract.Requires<NotSupportedException>(((IDirectWebRequestHandler)this).CanSupport(options), string.Format(MessagingStrings.DirectWebRequestOptionsNotSupported, options, this.GetType().Name));
+ Contract.Requires<NotSupportedException>(((IDirectWebRequestHandler)this).CanSupport(options), MessagingStrings.DirectWebRequestOptionsNotSupported);
+ ////ErrorUtilities.VerifySupported(((IDirectWebRequestHandler)this).CanSupport(options), string.Format(MessagingStrings.DirectWebRequestOptionsNotSupported, options, this.GetType().Name));
throw new System.NotImplementedException();
}
@@ -207,7 +208,8 @@ namespace DotNetOpenAuth.Messaging {
/// </remarks>
IncomingWebResponse IDirectWebRequestHandler.GetResponse(HttpWebRequest request, DirectWebRequestOptions options) {
Contract.Requires<ArgumentNullException>(request != null);
- Contract.Requires<NotSupportedException>(((IDirectWebRequestHandler)this).CanSupport(options), string.Format(MessagingStrings.DirectWebRequestOptionsNotSupported, options, this.GetType().Name));
+ Contract.Requires<NotSupportedException>(((IDirectWebRequestHandler)this).CanSupport(options), MessagingStrings.DirectWebRequestOptionsNotSupported);
+ ////ErrorUtilities.VerifySupported(((IDirectWebRequestHandler)this).CanSupport(options), string.Format(MessagingStrings.DirectWebRequestOptionsNotSupported, options, this.GetType().Name));
throw new System.NotImplementedException();
}
diff --git a/src/DotNetOpenAuth/Messaging/MessagingStrings.Designer.cs b/src/DotNetOpenAuth/Messaging/MessagingStrings.Designer.cs
index 593bbcd..ab1db3c 100644
--- a/src/DotNetOpenAuth/Messaging/MessagingStrings.Designer.cs
+++ b/src/DotNetOpenAuth/Messaging/MessagingStrings.Designer.cs
@@ -115,7 +115,7 @@ namespace DotNetOpenAuth.Messaging {
}
/// <summary>
- /// Looks up a localized string similar to The given set of options ({0}) is not supported by {1}..
+ /// Looks up a localized string similar to The given set of options is not supported by this web request handler..
/// </summary>
internal static string DirectWebRequestOptionsNotSupported {
get {
diff --git a/src/DotNetOpenAuth/Messaging/MessagingStrings.resx b/src/DotNetOpenAuth/Messaging/MessagingStrings.resx
index 30e6cc1..e6c3b59 100644
--- a/src/DotNetOpenAuth/Messaging/MessagingStrings.resx
+++ b/src/DotNetOpenAuth/Messaging/MessagingStrings.resx
@@ -136,7 +136,7 @@
<value>The directed message's Recipient property must not be null.</value>
</data>
<data name="DirectWebRequestOptionsNotSupported" xml:space="preserve">
- <value>The given set of options ({0}) is not supported by {1}.</value>
+ <value>The given set of options is not supported by this web request handler.</value>
</data>
<data name="ErrorDeserializingMessage" xml:space="preserve">
<value>Error while deserializing message {0}.</value>
diff --git a/src/DotNetOpenAuth/OpenId/OpenIdStrings.Designer.cs b/src/DotNetOpenAuth/OpenId/OpenIdStrings.Designer.cs
index 27dacfd..86a8715 100644
--- a/src/DotNetOpenAuth/OpenId/OpenIdStrings.Designer.cs
+++ b/src/DotNetOpenAuth/OpenId/OpenIdStrings.Designer.cs
@@ -349,7 +349,7 @@ namespace DotNetOpenAuth.OpenId {
}
/// <summary>
- /// Looks up a localized string similar to Not a recognized XRI format: &apos;{0}&apos;..
+ /// Looks up a localized string similar to Not a recognized XRI format..
/// </summary>
internal static string InvalidXri {
get {
diff --git a/src/DotNetOpenAuth/OpenId/OpenIdStrings.resx b/src/DotNetOpenAuth/OpenId/OpenIdStrings.resx
index bca813b..a4e560e 100644
--- a/src/DotNetOpenAuth/OpenId/OpenIdStrings.resx
+++ b/src/DotNetOpenAuth/OpenId/OpenIdStrings.resx
@@ -178,7 +178,7 @@
<value>The value '{0}' is not a valid URI.</value>
</data>
<data name="InvalidXri" xml:space="preserve">
- <value>Not a recognized XRI format: '{0}'.</value>
+ <value>Not a recognized XRI format.</value>
</data>
<data name="IssuedAssertionFailsIdentifierDiscovery" xml:space="preserve">
<value>The OpenID Provider issued an assertion for an Identifier whose discovery information did not match.
diff --git a/src/DotNetOpenAuth/OpenId/RelyingParty/IAuthenticationResponse.cs b/src/DotNetOpenAuth/OpenId/RelyingParty/IAuthenticationResponse.cs
index edffe9f..99cedd2 100644
--- a/src/DotNetOpenAuth/OpenId/RelyingParty/IAuthenticationResponse.cs
+++ b/src/DotNetOpenAuth/OpenId/RelyingParty/IAuthenticationResponse.cs
@@ -400,7 +400,8 @@ namespace DotNetOpenAuth.OpenId.RelyingParty {
/// </remarks>
IOpenIdMessageExtension IAuthenticationResponse.GetExtension(Type extensionType) {
Contract.Requires<ArgumentNullException>(extensionType != null);
- Contract.Requires<ArgumentException>(typeof(IOpenIdMessageExtension).IsAssignableFrom(extensionType), string.Format(CultureInfo.CurrentCulture, OpenIdStrings.TypeMustImplementX, typeof(IOpenIdMessageExtension).FullName));
+ Contract.Requires<ArgumentException>(typeof(IOpenIdMessageExtension).IsAssignableFrom(extensionType));
+ ////ErrorUtilities.VerifyArgument(typeof(IOpenIdMessageExtension).IsAssignableFrom(extensionType), string.Format(CultureInfo.CurrentCulture, OpenIdStrings.TypeMustImplementX, typeof(IOpenIdMessageExtension).FullName));
throw new NotImplementedException();
}
@@ -452,7 +453,8 @@ namespace DotNetOpenAuth.OpenId.RelyingParty {
/// </remarks>
IOpenIdMessageExtension IAuthenticationResponse.GetUntrustedExtension(Type extensionType) {
Contract.Requires<ArgumentNullException>(extensionType != null);
- Contract.Requires<ArgumentException>(typeof(IOpenIdMessageExtension).IsAssignableFrom(extensionType), string.Format(CultureInfo.CurrentCulture, OpenIdStrings.TypeMustImplementX, typeof(IOpenIdMessageExtension).FullName));
+ Contract.Requires<ArgumentException>(typeof(IOpenIdMessageExtension).IsAssignableFrom(extensionType));
+ ////ErrorUtilities.VerifyArgument(typeof(IOpenIdMessageExtension).IsAssignableFrom(extensionType), string.Format(CultureInfo.CurrentCulture, OpenIdStrings.TypeMustImplementX, typeof(IOpenIdMessageExtension).FullName));
throw new NotImplementedException();
}
diff --git a/src/DotNetOpenAuth/OpenId/RelyingParty/IProviderEndpoint.cs b/src/DotNetOpenAuth/OpenId/RelyingParty/IProviderEndpoint.cs
index 7571442..566a929 100644
--- a/src/DotNetOpenAuth/OpenId/RelyingParty/IProviderEndpoint.cs
+++ b/src/DotNetOpenAuth/OpenId/RelyingParty/IProviderEndpoint.cs
@@ -117,7 +117,8 @@ namespace DotNetOpenAuth.OpenId.RelyingParty {
/// </remarks>
bool IProviderEndpoint.IsExtensionSupported(Type extensionType) {
Contract.Requires<ArgumentNullException>(extensionType != null);
- Contract.Requires<ArgumentException>(typeof(IOpenIdMessageExtension).IsAssignableFrom(extensionType), string.Format(CultureInfo.CurrentCulture, OpenIdStrings.TypeMustImplementX, typeof(IOpenIdMessageExtension).FullName));
+ Contract.Requires<ArgumentException>(typeof(IOpenIdMessageExtension).IsAssignableFrom(extensionType));
+ ////ErrorUtilities.VerifyArgument(typeof(IOpenIdMessageExtension).IsAssignableFrom(extensionType), string.Format(CultureInfo.CurrentCulture, OpenIdStrings.TypeMustImplementX, typeof(IOpenIdMessageExtension).FullName));
throw new NotImplementedException();
}
diff --git a/src/DotNetOpenAuth/OpenId/RelyingParty/IXrdsProviderEndpointContract.cs b/src/DotNetOpenAuth/OpenId/RelyingParty/IXrdsProviderEndpointContract.cs
index fd399f9..e0e2b0b 100644
--- a/src/DotNetOpenAuth/OpenId/RelyingParty/IXrdsProviderEndpointContract.cs
+++ b/src/DotNetOpenAuth/OpenId/RelyingParty/IXrdsProviderEndpointContract.cs
@@ -49,7 +49,8 @@ namespace DotNetOpenAuth.OpenId.RelyingParty {
bool IProviderEndpoint.IsExtensionSupported(System.Type extensionType) {
Contract.Requires<ArgumentNullException>(extensionType != null);
- Contract.Requires<ArgumentException>(typeof(IOpenIdMessageExtension).IsAssignableFrom(extensionType), string.Format(CultureInfo.CurrentCulture, OpenIdStrings.TypeMustImplementX, typeof(IOpenIdMessageExtension).FullName));
+ Contract.Requires<ArgumentException>(typeof(IOpenIdMessageExtension).IsAssignableFrom(extensionType));
+ ////ErrorUtilities.VerifyArgument(typeof(IOpenIdMessageExtension).IsAssignableFrom(extensionType), string.Format(CultureInfo.CurrentCulture, OpenIdStrings.TypeMustImplementX, typeof(IOpenIdMessageExtension).FullName));
throw new System.NotImplementedException();
}
diff --git a/src/DotNetOpenAuth/OpenId/XriIdentifier.cs b/src/DotNetOpenAuth/OpenId/XriIdentifier.cs
index ec5f6aa..48dbbb9 100644
--- a/src/DotNetOpenAuth/OpenId/XriIdentifier.cs
+++ b/src/DotNetOpenAuth/OpenId/XriIdentifier.cs
@@ -76,7 +76,7 @@ namespace DotNetOpenAuth.OpenId {
internal XriIdentifier(string xri, bool requireSsl)
: base(requireSsl) {
Contract.Requires<ArgumentException>(!String.IsNullOrEmpty(xri));
- ErrorUtilities.VerifyFormat(IsValidXri(xri), OpenIdStrings.InvalidXri, xri);
+ Contract.Requires<FormatException>(IsValidXri(xri), OpenIdStrings.InvalidXri);
Contract.Assume(xri != null); // Proven by IsValidXri
this.xriResolverProxy = XriResolverProxyTemplate;
if (requireSsl) {