@@ -45,18 +45,18 @@ public override bool Equals(object? obj) =>
4545 public bool Equals ( GraphQLError ? other ) {
4646 if ( other == null ) { return false ; }
4747 if ( ReferenceEquals ( this , other ) ) { return true ; }
48- if ( ! EqualityComparer < IDictionary < string , dynamic > ? > . Default . Equals ( this . Extensions , other . Extensions ) ) { return false ; }
48+ if ( ! EqualityComparer < IDictionary < string , dynamic ? > ? > . Default . Equals ( this . Extensions , other . Extensions ) ) { return false ; }
4949 {
5050 if ( this . Locations != null && other . Locations != null ) {
51- if ( ! Enumerable . SequenceEqual ( this . Locations , other . Locations ) ) { return false ; }
51+ if ( ! this . Locations . SequenceEqual ( other . Locations ) ) { return false ; }
5252 }
5353 else if ( this . Locations != null && other . Locations == null ) { return false ; }
5454 else if ( this . Locations == null && other . Locations != null ) { return false ; }
5555 }
5656 if ( ! EqualityComparer < string > . Default . Equals ( this . Message , other . Message ) ) { return false ; }
5757 {
5858 if ( this . Path != null && other . Path != null ) {
59- if ( ! Enumerable . SequenceEqual ( this . Path , other . Path ) ) { return false ; }
59+ if ( ! this . Path . SequenceEqual ( other . Path ) ) { return false ; }
6060 }
6161 else if ( this . Path != null && other . Path == null ) { return false ; }
6262 else if ( this . Path == null && other . Path != null ) { return false ; }
@@ -68,31 +68,18 @@ public bool Equals(GraphQLError? other) {
6868 /// <inheritdoc cref="Object.GetHashCode"/>
6969 /// </summary>
7070 public override int GetHashCode ( ) {
71- unchecked {
72- var hashCode = EqualityComparer < IDictionary < string , dynamic > ? > . Default . GetHashCode ( this . Extensions ) ;
73- {
74- if ( this . Locations != null ) {
75- foreach ( var element in this . Locations ) {
76- hashCode = ( hashCode * 397 ) ^ EqualityComparer < GraphQLLocation ? > . Default . GetHashCode ( element ) ;
77- }
78- }
79- else {
80- hashCode = ( hashCode * 397 ) ^ 0 ;
81- }
82- }
83- hashCode = ( hashCode * 397 ) ^ EqualityComparer < string > . Default . GetHashCode ( this . Message ) ;
84- {
85- if ( this . Path != null ) {
86- foreach ( var element in this . Path ) {
87- hashCode = ( hashCode * 397 ) ^ EqualityComparer < dynamic ? > . Default . GetHashCode ( element ) ;
88- }
89- }
90- else {
91- hashCode = ( hashCode * 397 ) ^ 0 ;
92- }
93- }
94- return hashCode ;
71+ var hashCode = 0 ;
72+ if ( this . Extensions != null ) {
73+ hashCode = hashCode ^ EqualityComparer < IDictionary < string , dynamic ? > > . Default . GetHashCode ( this . Extensions ) ;
74+ }
75+ if ( this . Locations != null ) {
76+ hashCode = hashCode ^ EqualityComparer < GraphQLLocation [ ] > . Default . GetHashCode ( this . Locations ) ;
77+ }
78+ hashCode = hashCode ^ EqualityComparer < string > . Default . GetHashCode ( this . Message ) ;
79+ if ( this . Path != null ) {
80+ hashCode = hashCode ^ EqualityComparer < dynamic > . Default . GetHashCode ( this . Path ) ;
9581 }
82+ return hashCode ;
9683 }
9784
9885 /// <summary>
0 commit comments