diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2012-02-19 21:53:49 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2012-02-19 21:53:49 -0800 |
commit | adb907a28951e4bafd29d9c02582a90d7df48b06 (patch) | |
tree | fc0eaf6ef054c46c846cd785b108dfba51f68738 /src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs | |
parent | 339d48e68b86344bb611ed1db1050d8c2f569927 (diff) | |
download | DotNetOpenAuth-adb907a28951e4bafd29d9c02582a90d7df48b06.zip DotNetOpenAuth-adb907a28951e4bafd29d9c02582a90d7df48b06.tar.gz DotNetOpenAuth-adb907a28951e4bafd29d9c02582a90d7df48b06.tar.bz2 |
Removed requirement for callback parameter, per the spec.
Diffstat (limited to 'src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs')
-rw-r--r-- | src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs b/src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs index 3c62ffe..1305620 100644 --- a/src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs +++ b/src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs @@ -1107,12 +1107,18 @@ namespace DotNetOpenAuth.Messaging { /// Tests whether two arrays are equal in contents and ordering. /// </summary> /// <typeparam name="T">The type of elements in the arrays.</typeparam> - /// <param name="first">The first array in the comparison. May not be null.</param> - /// <param name="second">The second array in the comparison. May not be null.</param> + /// <param name="first">The first array in the comparison. May be null.</param> + /// <param name="second">The second array in the comparison. May be null.</param> /// <returns>True if the arrays equal; false otherwise.</returns> internal static bool AreEquivalent<T>(T[] first, T[] second) { - Requires.NotNull(first, "first"); - Requires.NotNull(second, "second"); + if (first == null && second == null) { + return true; + } + + if (first == null || second == null) { + return false; + } + if (first.Length != second.Length) { return false; } |