diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2012-03-10 07:49:13 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2012-03-10 07:49:13 -0800 |
commit | 6e68095c020f88f6c61b3a76f1fa885ead1e7f15 (patch) | |
tree | 83bfc6d5ff5cddf7144cc85de5b4df755753b724 /src/DotNetOpenAuth.Core | |
parent | 945b058634609684e72d6ea233d4643dd2f17a32 (diff) | |
parent | 351ecb6678ec3cbd469bfa8076dfdc7aad83e987 (diff) | |
download | DotNetOpenAuth-6e68095c020f88f6c61b3a76f1fa885ead1e7f15.zip DotNetOpenAuth-6e68095c020f88f6c61b3a76f1fa885ead1e7f15.tar.gz DotNetOpenAuth-6e68095c020f88f6c61b3a76f1fa885ead1e7f15.tar.bz2 |
Merge branch 'stylecopUpgrade'
Diffstat (limited to 'src/DotNetOpenAuth.Core')
-rw-r--r-- | src/DotNetOpenAuth.Core/Assumes.cs | 7 | ||||
-rw-r--r-- | src/DotNetOpenAuth.Core/DotNetOpenAuth.Core.csproj | 2 | ||||
-rw-r--r-- | src/DotNetOpenAuth.Core/Loggers/ILog.cs | 80 | ||||
-rw-r--r-- | src/DotNetOpenAuth.Core/Messaging/Channel.cs | 2 | ||||
-rw-r--r-- | src/DotNetOpenAuth.Core/Messaging/DataBagFormatterBase.cs | 2 | ||||
-rw-r--r-- | src/DotNetOpenAuth.Core/Messaging/EmptyDictionary.cs | 1 | ||||
-rw-r--r-- | src/DotNetOpenAuth.Core/Messaging/EmptyList.cs | 1 | ||||
-rw-r--r-- | src/DotNetOpenAuth.Core/Messaging/EnumerableCacheExtensions.cs (renamed from src/DotNetOpenAuth.Core/Messaging/EnumerableCache.cs) | 2 | ||||
-rw-r--r-- | src/DotNetOpenAuth.Core/Messaging/IDataBagFormatter.cs | 2 | ||||
-rw-r--r-- | src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs | 2 | ||||
-rw-r--r-- | src/DotNetOpenAuth.Core/Messaging/UntrustedWebRequestHandler.cs | 2 | ||||
-rw-r--r-- | src/DotNetOpenAuth.Core/Messaging/UriStyleMessageFormatter.cs | 2 | ||||
-rw-r--r-- | src/DotNetOpenAuth.Core/Reporting.cs | 4 | ||||
-rw-r--r-- | src/DotNetOpenAuth.Core/Requires.cs | 4 |
14 files changed, 58 insertions, 55 deletions
diff --git a/src/DotNetOpenAuth.Core/Assumes.cs b/src/DotNetOpenAuth.Core/Assumes.cs index b61fbd4..f29f09f 100644 --- a/src/DotNetOpenAuth.Core/Assumes.cs +++ b/src/DotNetOpenAuth.Core/Assumes.cs @@ -12,6 +12,7 @@ namespace DotNetOpenAuth { using System.Diagnostics.Contracts; using System.Globalization; using System.Linq; + using System.Runtime.Serialization; using System.Text; /// <summary> @@ -39,7 +40,7 @@ namespace DotNetOpenAuth { [Pure, DebuggerStepThrough] internal static void True(bool condition, string unformattedMessage, params object[] args) { if (!condition) { - Fail(String.Format(CultureInfo.CurrentCulture, unformattedMessage, args)); + Fail(string.Format(CultureInfo.CurrentCulture, unformattedMessage, args)); } } @@ -84,8 +85,8 @@ namespace DotNetOpenAuth { /// <exception cref="T:System.ArgumentNullException">The <paramref name="info"/> parameter is null. </exception> /// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult"/> is zero (0). </exception> protected InternalErrorException( - System.Runtime.Serialization.SerializationInfo info, - System.Runtime.Serialization.StreamingContext context) + SerializationInfo info, + StreamingContext context) : base(info, context) { } } diff --git a/src/DotNetOpenAuth.Core/DotNetOpenAuth.Core.csproj b/src/DotNetOpenAuth.Core/DotNetOpenAuth.Core.csproj index ad17119..c46e6b8 100644 --- a/src/DotNetOpenAuth.Core/DotNetOpenAuth.Core.csproj +++ b/src/DotNetOpenAuth.Core/DotNetOpenAuth.Core.csproj @@ -32,7 +32,7 @@ <Compile Include="Messaging\IHttpIndirectResponse.cs" /> <Compile Include="Messaging\IMessageOriginalPayload.cs" /> <Compile Include="Messaging\DirectWebRequestOptions.cs" /> - <Compile Include="Messaging\EnumerableCache.cs" /> + <Compile Include="Messaging\EnumerableCacheExtensions.cs" /> <Compile Include="Messaging\HostErrorException.cs" /> <Compile Include="Messaging\IHttpDirectResponse.cs" /> <Compile Include="Messaging\IExtensionMessage.cs" /> diff --git a/src/DotNetOpenAuth.Core/Loggers/ILog.cs b/src/DotNetOpenAuth.Core/Loggers/ILog.cs index 8094296..e801b2a 100644 --- a/src/DotNetOpenAuth.Core/Loggers/ILog.cs +++ b/src/DotNetOpenAuth.Core/Loggers/ILog.cs @@ -122,8 +122,8 @@ namespace DotNetOpenAuth.Loggers /// <param name="args">An Object array containing zero or more objects to format</param> /// <remarks> /// <para> - /// The message is formatted using the <c>String.Format</c> method. See - /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior + /// The message is formatted using the <c>string.Format</c> method. See + /// <see cref="string.Format(string, object[])"/> for details of the syntax of the format string and the behavior /// of the formatting. /// </para> /// <para> @@ -143,8 +143,8 @@ namespace DotNetOpenAuth.Loggers /// <param name="arg0">An Object to format</param> /// <remarks> /// <para> - /// The message is formatted using the <c>String.Format</c> method. See - /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior + /// The message is formatted using the <c>string.Format</c> method. See + /// <see cref="string.Format(string, object[])"/> for details of the syntax of the format string and the behavior /// of the formatting. /// </para> /// <para> @@ -165,8 +165,8 @@ namespace DotNetOpenAuth.Loggers /// <param name="arg1">An Object to format</param> /// <remarks> /// <para> - /// The message is formatted using the <c>String.Format</c> method. See - /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior + /// The message is formatted using the <c>string.Format</c> method. See + /// <see cref="string.Format(string, object[])"/> for details of the syntax of the format string and the behavior /// of the formatting. /// </para> /// <para> @@ -188,8 +188,8 @@ namespace DotNetOpenAuth.Loggers /// <param name="arg2">An Object to format</param> /// <remarks> /// <para> - /// The message is formatted using the <c>String.Format</c> method. See - /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior + /// The message is formatted using the <c>string.Format</c> method. See + /// <see cref="string.Format(string, object[])"/> for details of the syntax of the format string and the behavior /// of the formatting. /// </para> /// <para> @@ -253,8 +253,8 @@ namespace DotNetOpenAuth.Loggers /// <param name="args">An Object array containing zero or more objects to format</param> /// <remarks> /// <para> - /// The message is formatted using the <c>String.Format</c> method. See - /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior + /// The message is formatted using the <c>string.Format</c> method. See + /// <see cref="string.Format(string, object[])"/> for details of the syntax of the format string and the behavior /// of the formatting. /// </para> /// <para> @@ -274,8 +274,8 @@ namespace DotNetOpenAuth.Loggers /// <param name="arg0">An Object to format</param> /// <remarks> /// <para> - /// The message is formatted using the <c>String.Format</c> method. See - /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior + /// The message is formatted using the <c>string.Format</c> method. See + /// <see cref="string.Format(string, object[])"/> for details of the syntax of the format string and the behavior /// of the formatting. /// </para> /// <para> @@ -296,8 +296,8 @@ namespace DotNetOpenAuth.Loggers /// <param name="arg1">An Object to format</param> /// <remarks> /// <para> - /// The message is formatted using the <c>String.Format</c> method. See - /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior + /// The message is formatted using the <c>string.Format</c> method. See + /// <see cref="string.Format(string, object[])"/> for details of the syntax of the format string and the behavior /// of the formatting. /// </para> /// <para> @@ -319,8 +319,8 @@ namespace DotNetOpenAuth.Loggers /// <param name="arg2">An Object to format</param> /// <remarks> /// <para> - /// The message is formatted using the <c>String.Format</c> method. See - /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior + /// The message is formatted using the <c>string.Format</c> method. See + /// <see cref="string.Format(string, object[])"/> for details of the syntax of the format string and the behavior /// of the formatting. /// </para> /// <para> @@ -384,8 +384,8 @@ namespace DotNetOpenAuth.Loggers /// <param name="args">An Object array containing zero or more objects to format</param> /// <remarks> /// <para> - /// The message is formatted using the <c>String.Format</c> method. See - /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior + /// The message is formatted using the <c>string.Format</c> method. See + /// <see cref="string.Format(string, object[])"/> for details of the syntax of the format string and the behavior /// of the formatting. /// </para> /// <para> @@ -405,8 +405,8 @@ namespace DotNetOpenAuth.Loggers /// <param name="arg0">An Object to format</param> /// <remarks> /// <para> - /// The message is formatted using the <c>String.Format</c> method. See - /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior + /// The message is formatted using the <c>string.Format</c> method. See + /// <see cref="string.Format(string, object[])"/> for details of the syntax of the format string and the behavior /// of the formatting. /// </para> /// <para> @@ -427,8 +427,8 @@ namespace DotNetOpenAuth.Loggers /// <param name="arg1">An Object to format</param> /// <remarks> /// <para> - /// The message is formatted using the <c>String.Format</c> method. See - /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior + /// The message is formatted using the <c>string.Format</c> method. See + /// <see cref="string.Format(string, object[])"/> for details of the syntax of the format string and the behavior /// of the formatting. /// </para> /// <para> @@ -450,8 +450,8 @@ namespace DotNetOpenAuth.Loggers /// <param name="arg2">An Object to format</param> /// <remarks> /// <para> - /// The message is formatted using the <c>String.Format</c> method. See - /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior + /// The message is formatted using the <c>string.Format</c> method. See + /// <see cref="string.Format(string, object[])"/> for details of the syntax of the format string and the behavior /// of the formatting. /// </para> /// <para> @@ -515,8 +515,8 @@ namespace DotNetOpenAuth.Loggers /// <param name="args">An Object array containing zero or more objects to format</param> /// <remarks> /// <para> - /// The message is formatted using the <c>String.Format</c> method. See - /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior + /// The message is formatted using the <c>string.Format</c> method. See + /// <see cref="string.Format(string, object[])"/> for details of the syntax of the format string and the behavior /// of the formatting. /// </para> /// <para> @@ -536,8 +536,8 @@ namespace DotNetOpenAuth.Loggers /// <param name="arg0">An Object to format</param> /// <remarks> /// <para> - /// The message is formatted using the <c>String.Format</c> method. See - /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior + /// The message is formatted using the <c>string.Format</c> method. See + /// <see cref="string.Format(string, object[])"/> for details of the syntax of the format string and the behavior /// of the formatting. /// </para> /// <para> @@ -558,8 +558,8 @@ namespace DotNetOpenAuth.Loggers /// <param name="arg1">An Object to format</param> /// <remarks> /// <para> - /// The message is formatted using the <c>String.Format</c> method. See - /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior + /// The message is formatted using the <c>string.Format</c> method. See + /// <see cref="string.Format(string, object[])"/> for details of the syntax of the format string and the behavior /// of the formatting. /// </para> /// <para> @@ -581,8 +581,8 @@ namespace DotNetOpenAuth.Loggers /// <param name="arg2">An Object to format</param> /// <remarks> /// <para> - /// The message is formatted using the <c>String.Format</c> method. See - /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior + /// The message is formatted using the <c>string.Format</c> method. See + /// <see cref="string.Format(string, object[])"/> for details of the syntax of the format string and the behavior /// of the formatting. /// </para> /// <para> @@ -646,8 +646,8 @@ namespace DotNetOpenAuth.Loggers /// <param name="args">An Object array containing zero or more objects to format</param> /// <remarks> /// <para> - /// The message is formatted using the <c>String.Format</c> method. See - /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior + /// The message is formatted using the <c>string.Format</c> method. See + /// <see cref="string.Format(string, object[])"/> for details of the syntax of the format string and the behavior /// of the formatting. /// </para> /// <para> @@ -667,8 +667,8 @@ namespace DotNetOpenAuth.Loggers /// <param name="arg0">An Object to format</param> /// <remarks> /// <para> - /// The message is formatted using the <c>String.Format</c> method. See - /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior + /// The message is formatted using the <c>string.Format</c> method. See + /// <see cref="string.Format(string, object[])"/> for details of the syntax of the format string and the behavior /// of the formatting. /// </para> /// <para> @@ -689,8 +689,8 @@ namespace DotNetOpenAuth.Loggers /// <param name="arg1">An Object to format</param> /// <remarks> /// <para> - /// The message is formatted using the <c>String.Format</c> method. See - /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior + /// The message is formatted using the <c>string.Format</c> method. See + /// <see cref="string.Format(string, object[])"/> for details of the syntax of the format string and the behavior /// of the formatting. /// </para> /// <para> @@ -712,8 +712,8 @@ namespace DotNetOpenAuth.Loggers /// <param name="arg2">An Object to format</param> /// <remarks> /// <para> - /// The message is formatted using the <c>String.Format</c> method. See - /// <see cref="String.Format(string, object[])"/> for details of the syntax of the format string and the behavior + /// The message is formatted using the <c>string.Format</c> method. See + /// <see cref="string.Format(string, object[])"/> for details of the syntax of the format string and the behavior /// of the formatting. /// </para> /// <para> diff --git a/src/DotNetOpenAuth.Core/Messaging/Channel.cs b/src/DotNetOpenAuth.Core/Messaging/Channel.cs index d8b25fa..2e4da38 100644 --- a/src/DotNetOpenAuth.Core/Messaging/Channel.cs +++ b/src/DotNetOpenAuth.Core/Messaging/Channel.cs @@ -69,7 +69,7 @@ namespace DotNetOpenAuth.Messaging { /// <summary> /// The HTML that should be returned to the user agent as part of a 301 Redirect. /// </summary> - /// <value>A string that should be used as the first argument to String.Format, where the {0} should be replaced with the URL to redirect to.</value> + /// <value>A string that should be used as the first argument to string.Format, where the {0} should be replaced with the URL to redirect to.</value> private const string RedirectResponseBodyFormat = @"<html><head><title>Object moved</title></head><body> <h2>Object moved to <a href=""{0}"">here</a>.</h2> </body></html>"; diff --git a/src/DotNetOpenAuth.Core/Messaging/DataBagFormatterBase.cs b/src/DotNetOpenAuth.Core/Messaging/DataBagFormatterBase.cs index 43df1f5..7a805b1 100644 --- a/src/DotNetOpenAuth.Core/Messaging/DataBagFormatterBase.cs +++ b/src/DotNetOpenAuth.Core/Messaging/DataBagFormatterBase.cs @@ -110,7 +110,7 @@ namespace DotNetOpenAuth.Messaging { /// <param name="decodeOnceOnly">The nonce store to use to ensure that this instance is only decoded once.</param> protected DataBagFormatterBase(ICryptoKeyStore cryptoKeyStore = null, string bucket = null, bool signed = false, bool encrypted = false, bool compressed = false, TimeSpan? minimumAge = null, TimeSpan? maximumAge = null, INonceStore decodeOnceOnly = null) : this(signed, encrypted, compressed, maximumAge, decodeOnceOnly) { - Requires.True(!String.IsNullOrEmpty(bucket) || cryptoKeyStore == null, null); + Requires.True(!string.IsNullOrEmpty(bucket) || cryptoKeyStore == null, null); Requires.True(cryptoKeyStore != null || (!signed && !encrypted), null); this.cryptoKeyStore = cryptoKeyStore; diff --git a/src/DotNetOpenAuth.Core/Messaging/EmptyDictionary.cs b/src/DotNetOpenAuth.Core/Messaging/EmptyDictionary.cs index a686d45..f21be78 100644 --- a/src/DotNetOpenAuth.Core/Messaging/EmptyDictionary.cs +++ b/src/DotNetOpenAuth.Core/Messaging/EmptyDictionary.cs @@ -75,6 +75,7 @@ namespace DotNetOpenAuth.Messaging { /// Gets or sets the value with the specified key. /// </summary> /// <param name="key">The key being read or written.</param> + /// <returns>Nothing. It always throws.</returns> public TValue this[TKey key] { get { throw new KeyNotFoundException(); } set { throw new NotSupportedException(); } diff --git a/src/DotNetOpenAuth.Core/Messaging/EmptyList.cs b/src/DotNetOpenAuth.Core/Messaging/EmptyList.cs index 6790e19..5d64118 100644 --- a/src/DotNetOpenAuth.Core/Messaging/EmptyList.cs +++ b/src/DotNetOpenAuth.Core/Messaging/EmptyList.cs @@ -53,6 +53,7 @@ namespace DotNetOpenAuth.Messaging { /// Gets or sets the <typeparamref name="T"/> at the specified index. /// </summary> /// <param name="index">The index of the element in the list to change.</param> + /// <returns>Nothing. It always throws.</returns> public T this[int index] { get { throw new ArgumentOutOfRangeException("index"); diff --git a/src/DotNetOpenAuth.Core/Messaging/EnumerableCache.cs b/src/DotNetOpenAuth.Core/Messaging/EnumerableCacheExtensions.cs index afbdf30..5e9cf93 100644 --- a/src/DotNetOpenAuth.Core/Messaging/EnumerableCache.cs +++ b/src/DotNetOpenAuth.Core/Messaging/EnumerableCacheExtensions.cs @@ -1,5 +1,5 @@ //----------------------------------------------------------------------- -// <copyright file="EnumerableCache.cs" company="Outercurve Foundation"> +// <copyright file="EnumerableCacheExtensions.cs" company="Outercurve Foundation"> // Copyright (c) Outercurve Foundation. All rights reserved. // This code is released under the Microsoft Public License (Ms-PL). // </copyright> diff --git a/src/DotNetOpenAuth.Core/Messaging/IDataBagFormatter.cs b/src/DotNetOpenAuth.Core/Messaging/IDataBagFormatter.cs index f911264..5e07bc6 100644 --- a/src/DotNetOpenAuth.Core/Messaging/IDataBagFormatter.cs +++ b/src/DotNetOpenAuth.Core/Messaging/IDataBagFormatter.cs @@ -51,7 +51,7 @@ namespace DotNetOpenAuth.Messaging { /// <returns>A non-null, non-empty value.</returns> string IDataBagFormatter<T>.Serialize(T message) { Requires.NotNull(message, "message"); - Contract.Ensures(!String.IsNullOrEmpty(Contract.Result<string>())); + Contract.Ensures(!string.IsNullOrEmpty(Contract.Result<string>())); throw new System.NotImplementedException(); } diff --git a/src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs b/src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs index 664db71..b26deeb 100644 --- a/src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs +++ b/src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs @@ -446,7 +446,7 @@ namespace DotNetOpenAuth.Messaging { internal static string CombineKeyHandleAndPayload(string handle, string payload) { Requires.NotNullOrEmpty(handle, "handle"); Requires.NotNullOrEmpty(payload, "payload"); - Contract.Ensures(!String.IsNullOrEmpty(Contract.Result<string>())); + Contract.Ensures(!string.IsNullOrEmpty(Contract.Result<string>())); return handle + "!" + payload; } diff --git a/src/DotNetOpenAuth.Core/Messaging/UntrustedWebRequestHandler.cs b/src/DotNetOpenAuth.Core/Messaging/UntrustedWebRequestHandler.cs index c490127..25a7bbb 100644 --- a/src/DotNetOpenAuth.Core/Messaging/UntrustedWebRequestHandler.cs +++ b/src/DotNetOpenAuth.Core/Messaging/UntrustedWebRequestHandler.cs @@ -383,7 +383,7 @@ namespace DotNetOpenAuth.Messaging { /// <exception cref="ProtocolException">Thrown when the URI is disallowed for security reasons.</exception> private void EnsureAllowableRequestUri(Uri requestUri, bool requireSsl) { ErrorUtilities.VerifyProtocol(this.IsUriAllowable(requestUri), MessagingStrings.UnsafeWebRequestDetected, requestUri); - ErrorUtilities.VerifyProtocol(!requireSsl || String.Equals(requestUri.Scheme, Uri.UriSchemeHttps, StringComparison.OrdinalIgnoreCase), MessagingStrings.InsecureWebRequestWithSslRequired, requestUri); + ErrorUtilities.VerifyProtocol(!requireSsl || string.Equals(requestUri.Scheme, Uri.UriSchemeHttps, StringComparison.OrdinalIgnoreCase), MessagingStrings.InsecureWebRequestWithSslRequired, requestUri); } /// <summary> diff --git a/src/DotNetOpenAuth.Core/Messaging/UriStyleMessageFormatter.cs b/src/DotNetOpenAuth.Core/Messaging/UriStyleMessageFormatter.cs index 84e75b0..92b1928 100644 --- a/src/DotNetOpenAuth.Core/Messaging/UriStyleMessageFormatter.cs +++ b/src/DotNetOpenAuth.Core/Messaging/UriStyleMessageFormatter.cs @@ -46,7 +46,7 @@ namespace DotNetOpenAuth.Messaging { /// <param name="decodeOnceOnly">The nonce store to use to ensure that this instance is only decoded once.</param> protected internal UriStyleMessageFormatter(ICryptoKeyStore cryptoKeyStore = null, string bucket = null, bool signed = false, bool encrypted = false, bool compressed = false, TimeSpan? minimumAge = null, TimeSpan? maximumAge = null, INonceStore decodeOnceOnly = null) : base(cryptoKeyStore, bucket, signed, encrypted, compressed, minimumAge, maximumAge, decodeOnceOnly) { - Requires.True((cryptoKeyStore != null && !String.IsNullOrEmpty(bucket)) || (!signed && !encrypted), null); + Requires.True((cryptoKeyStore != null && !string.IsNullOrEmpty(bucket)) || (!signed && !encrypted), null); } /// <summary> diff --git a/src/DotNetOpenAuth.Core/Reporting.cs b/src/DotNetOpenAuth.Core/Reporting.cs index 310d1ba..951bb7c 100644 --- a/src/DotNetOpenAuth.Core/Reporting.cs +++ b/src/DotNetOpenAuth.Core/Reporting.cs @@ -170,7 +170,7 @@ namespace DotNetOpenAuth { /// <param name="category">The category within the event. Null and empty strings are allowed, but considered the same.</param> [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "PersistentCounter instances are stored in a table for later use.")] internal static void RecordEventOccurrence(string eventName, string category) { - Contract.Requires(!String.IsNullOrEmpty(eventName)); + Contract.Requires(!string.IsNullOrEmpty(eventName)); // In release builds, just quietly return. if (string.IsNullOrEmpty(eventName)) { @@ -213,7 +213,7 @@ namespace DotNetOpenAuth { /// </summary> /// <param name="feature">The feature.</param> internal static void RecordFeatureUse(string feature) { - Contract.Requires(!String.IsNullOrEmpty(feature)); + Contract.Requires(!string.IsNullOrEmpty(feature)); // In release builds, just quietly return. if (string.IsNullOrEmpty(feature)) { diff --git a/src/DotNetOpenAuth.Core/Requires.cs b/src/DotNetOpenAuth.Core/Requires.cs index 1aa0cf8..7a196a3 100644 --- a/src/DotNetOpenAuth.Core/Requires.cs +++ b/src/DotNetOpenAuth.Core/Requires.cs @@ -136,7 +136,7 @@ namespace DotNetOpenAuth { [Pure, DebuggerStepThrough] internal static void True(bool condition, string parameterName, string unformattedMessage, params object[] args) { if (!condition) { - throw new ArgumentException(String.Format(CultureInfo.CurrentCulture, unformattedMessage, args), parameterName); + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, unformattedMessage, args), parameterName); } Contract.EndContractBlock(); @@ -187,7 +187,7 @@ namespace DotNetOpenAuth { [Pure, DebuggerStepThrough] internal static void ValidState(bool condition, string unformattedMessage, params object[] args) { if (!condition) { - throw new InvalidOperationException(String.Format(CultureInfo.CurrentCulture, unformattedMessage, args)); + throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, unformattedMessage, args)); } Contract.EndContractBlock(); |