2
2
using System . Collections . Generic ;
3
3
using System . Linq ;
4
4
5
- namespace Exceptionless
6
- {
7
- internal static class CollectionEqualityExtensions
8
- {
5
+ namespace Exceptionless {
6
+ internal static class CollectionEqualityExtensions {
9
7
public static bool CollectionEquals < T > ( this IEnumerable < T > source , IEnumerable < T > other ) {
10
8
var sourceEnumerator = source . GetEnumerator ( ) ;
11
9
var otherEnumerator = other . GetEnumerator ( ) ;
@@ -29,8 +27,7 @@ public static bool CollectionEquals<T>(this IEnumerable<T> source, IEnumerable<T
29
27
return true ;
30
28
}
31
29
32
- public static bool CollectionEquals < TValue > ( this IDictionary < string , TValue > source , IDictionary < string , TValue > other )
33
- {
30
+ public static bool CollectionEquals < TValue > ( this IDictionary < string , TValue > source , IDictionary < string , TValue > other ) {
34
31
if ( source . Count != other . Count ) {
35
32
return false ;
36
33
}
@@ -55,7 +52,8 @@ public static int GetCollectionHashCode<T>(this IEnumerable<T> source) {
55
52
int hashCode = assemblyQualifiedName == null ? 0 : assemblyQualifiedName . GetHashCode ( ) ;
56
53
57
54
foreach ( var item in source ) {
58
- if ( item == null ) continue ;
55
+ if ( item == null )
56
+ continue ;
59
57
60
58
unchecked {
61
59
hashCode = ( hashCode * 397 ) ^ item . GetHashCode ( ) ;
@@ -64,8 +62,7 @@ public static int GetCollectionHashCode<T>(this IEnumerable<T> source) {
64
62
return hashCode ;
65
63
}
66
64
67
- public static int GetCollectionHashCode < TValue > ( this IDictionary < string , TValue > source )
68
- {
65
+ public static int GetCollectionHashCode < TValue > ( this IDictionary < string , TValue > source ) {
69
66
var assemblyQualifiedName = typeof ( TValue ) . AssemblyQualifiedName ;
70
67
int hashCode = assemblyQualifiedName == null ? 0 : assemblyQualifiedName . GetHashCode ( ) ;
71
68
0 commit comments