Skip to content

Commit d902b25

Browse files
committed
Merge remote-tracking branch 'origin/main' into dev/rolf/release/9.0.1xx
2 parents 43cfee7 + 7d6b071 commit d902b25

22 files changed

+82
-75
lines changed

dotnet/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ $(foreach platform,$(DOTNET_WINDOWS_PLATFORMS),$(eval $(call DefineWindowsTarget
5858
ifdef INCLUDE_HOTRESTART
5959

6060
iOS_WINDOWS_NUGET_TARGETS += \
61-
$(DOTNET_DESTDIR)/$(IOS_NUGET_WINDOWS_SDK_NAME)/tools/msbuild/Xamarin.PreBuilt.iOS.app.zip \
61+
$(DOTNET_DESTDIR)/$(IOS_NUGET_WINDOWS_SDK_NAME)/tools/msbuild/iOS/Xamarin.PreBuilt.iOS.app.zip \
6262

6363
endif
6464

@@ -507,7 +507,7 @@ clean-local::
507507
$(Q) $(DOTNET) restore package/workaround-for-maccore-issue-2427/restore.csproj /bl:package/workaround-for-maccore-issue-2427/restore.binlog $(MSBUILD_VERBOSITY)
508508
$(Q) touch $@
509509

510-
$(DOTNET_DESTDIR)/$(IOS_NUGET_WINDOWS_SDK_NAME)/tools/msbuild/Xamarin.PreBuilt.iOS.app.zip: .stamp-install-workloads
510+
$(DOTNET_DESTDIR)/$(IOS_NUGET_WINDOWS_SDK_NAME)/tools/msbuild/iOS/Xamarin.PreBuilt.iOS.app.zip: .stamp-install-workloads
511511
$(Q) $(MAKE) -C $(TOP)/msbuild/Xamarin.HotRestart.PreBuilt all
512512
$(Q) touch $@
513513

dotnet/Workloads/SignList.xml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
<ItemGroup>
44
<Skip Include="System.Reflection.MetadataLoadContext.dll" />
55
<!-- Microsoft.iOS.Windows.Sdk content -->
6-
<Skip Include="tools\msbuild\Microsoft.Win32.Registry.dll" />
7-
<Skip Include="tools\msbuild\System.Buffers.dll" />
8-
<Skip Include="tools\msbuild\System.Formats.Asn1.dll" />
9-
<Skip Include="tools\msbuild\System.Memory.dll" />
10-
<Skip Include="tools\msbuild\System.Numerics.Vectors.dll" />
11-
<Skip Include="tools\msbuild\System.Runtime.CompilerServices.Unsafe.dll" />
12-
<Skip Include="tools\msbuild\System.Security.AccessControl.dll" />
13-
<Skip Include="tools\msbuild\System.Security.Cryptography.Pkcs.dll" />
14-
<Skip Include="tools\msbuild\System.Security.Cryptography.ProtectedData.dll" />
15-
<Skip Include="tools\msbuild\System.Security.Principal.Windows.dll" />
16-
<Skip Include="tools\msbuild\ws2_32.dll" />
6+
<Skip Include="tools\msbuild\iOS\Microsoft.Win32.Registry.dll" />
7+
<Skip Include="tools\msbuild\iOS\System.Buffers.dll" />
8+
<Skip Include="tools\msbuild\iOS\System.Formats.Asn1.dll" />
9+
<Skip Include="tools\msbuild\iOS\System.Memory.dll" />
10+
<Skip Include="tools\msbuild\iOS\System.Numerics.Vectors.dll" />
11+
<Skip Include="tools\msbuild\iOS\System.Runtime.CompilerServices.Unsafe.dll" />
12+
<Skip Include="tools\msbuild\iOS\System.Security.AccessControl.dll" />
13+
<Skip Include="tools\msbuild\iOS\System.Security.Cryptography.Pkcs.dll" />
14+
<Skip Include="tools\msbuild\iOS\System.Security.Cryptography.ProtectedData.dll" />
15+
<Skip Include="tools\msbuild\iOS\System.Security.Principal.Windows.dll" />
16+
<Skip Include="tools\msbuild\iOS\ws2_32.dll" />
1717
<!-- Broker.zip -->
1818
<Skip Include="Broker\Newtonsoft.Json.dll" />
1919
<Skip Include="Broker\System.Net.Mqtt.dll" />

mk/xamarin-reset.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ if test -d "$DEPENDENCY_PATH"; then
3939
fi
4040

4141
else
42-
echo "*** [$DEPENDENCY_NAME] git $DEPENDENCY_AUTH clone $DEPENDENCY_MODULE --recursive $DEPENDENCY_DIRECTORY -b $DEPENDENCY_BRANCH --origin $DEPENDENCY_REMOTE"
42+
echo "*** [$DEPENDENCY_NAME] git" "${DEPENDENCY_AUTH[@]}" "clone $DEPENDENCY_MODULE --recursive $DEPENDENCY_DIRECTORY -b $DEPENDENCY_BRANCH --origin $DEPENDENCY_REMOTE"
4343
mkdir -p "$(dirname "$DEPENDENCY_PATH")"
4444
cd "$(dirname "$DEPENDENCY_PATH")"
45-
git $DEPENDANCY_AUTH clone "$DEPENDENCY_MODULE" --recursive "$DEPENDENCY_DIRECTORY" -b "$DEPENDENCY_BRANCH" --origin "$DEPENDENCY_REMOTE"
45+
git "$DEPENDENCY_AUTH" "$DEPENDENCY_MODULE" --recursive "$DEPENDENCY_DIRECTORY" -b "$DEPENDENCY_BRANCH" --origin "$DEPENDENCY_REMOTE"
4646
cd "$DEPENDENCY_DIRECTORY"
4747
fi
4848

src/rgen/Microsoft.Macios.Generator/DataModel/Accessor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public bool Equals (Accessor other)
4444
var attrsComparer = new AttributesEqualityComparer ();
4545
if (!attrsComparer.Equals (Attributes, other.Attributes))
4646
return false;
47-
var modifiersComparer = new ModifiersComparer ();
47+
var modifiersComparer = new ModifiersEqualityComparer ();
4848
return modifiersComparer.Equals (Modifiers, other.Modifiers);
4949
}
5050

src/rgen/Microsoft.Macios.Generator/DataModel/AccessorsEqualityComparer.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
namespace Microsoft.Macios.Generator.DataModel;
77

8-
class AccessorsEqualityComparer : IEqualityComparer<ImmutableArray<Accessor>> {
9-
public bool Equals (ImmutableArray<Accessor> x, ImmutableArray<Accessor> y)
8+
class AccessorsEqualityComparer : EqualityComparer<ImmutableArray<Accessor>> {
9+
public override bool Equals (ImmutableArray<Accessor> x, ImmutableArray<Accessor> y)
1010
{
1111
// property accessor kinds cannot be duplicated due to the definition of the language, create two dictionaries
1212
// using the kind as a key and then re-use our dictionary comparer
@@ -16,7 +16,7 @@ public bool Equals (ImmutableArray<Accessor> x, ImmutableArray<Accessor> y)
1616
return comparer.Equals (xDictionary, yDictionary);
1717
}
1818

19-
public int GetHashCode (ImmutableArray<Accessor> obj)
19+
public override int GetHashCode (ImmutableArray<Accessor> obj)
2020
{
2121
var hashCode = new HashCode ();
2222
foreach (var accessor in obj) {

src/rgen/Microsoft.Macios.Generator/DataModel/AttributesEqualityComparer.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ public int Compare (AttributeCodeChange x, AttributeCodeChange y)
3030
return 0;
3131
}
3232
}
33-
class AttributesEqualityComparer : IEqualityComparer<ImmutableArray<AttributeCodeChange>> {
33+
class AttributesEqualityComparer : EqualityComparer<ImmutableArray<AttributeCodeChange>> {
3434

35-
public bool Equals (ImmutableArray<AttributeCodeChange> x, ImmutableArray<AttributeCodeChange> y)
35+
public override bool Equals (ImmutableArray<AttributeCodeChange> x, ImmutableArray<AttributeCodeChange> y)
3636
{
3737
if (x.Length != y.Length)
3838
return false;
@@ -46,7 +46,7 @@ public bool Equals (ImmutableArray<AttributeCodeChange> x, ImmutableArray<Attrib
4646
return true;
4747
}
4848

49-
public int GetHashCode (ImmutableArray<AttributeCodeChange> obj)
49+
public override int GetHashCode (ImmutableArray<AttributeCodeChange> obj)
5050
{
5151
var hash = new HashCode ();
5252
foreach (var change in obj) {

src/rgen/Microsoft.Macios.Generator/DataModel/CodeChangesEqualityComparer.cs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,28 @@
44

55
namespace Microsoft.Macios.Generator.DataModel;
66

7-
class DeclarationCodeChangesEqualityComparer : IEqualityComparer<(BaseTypeDeclarationSyntax Declaration, CodeChanges
7+
class DeclarationCodeChangesEqualityComparer : EqualityComparer<(BaseTypeDeclarationSyntax Declaration, CodeChanges
88
Changes)> {
99
readonly CodeChangesEqualityComparer comparer = new ();
1010

11-
public bool Equals ((BaseTypeDeclarationSyntax Declaration, CodeChanges Changes) x,
11+
/// <inheritdoc/>
12+
public override bool Equals ((BaseTypeDeclarationSyntax Declaration, CodeChanges Changes) x,
1213
(BaseTypeDeclarationSyntax Declaration, CodeChanges Changes) y)
1314
{
1415
return comparer.Equals (x.Changes, y.Changes);
1516
}
1617

17-
public int GetHashCode ((BaseTypeDeclarationSyntax Declaration, CodeChanges Changes) obj)
18+
/// <inheritdoc/>
19+
public override int GetHashCode ((BaseTypeDeclarationSyntax Declaration, CodeChanges Changes) obj)
1820
=> comparer.GetHashCode (obj.Changes);
1921
}
2022

2123
/// <summary>
2224
/// Custom code changes comparer used for the Roslyn code generation to invalidate caching.
2325
/// </summary>
24-
class CodeChangesEqualityComparer : IEqualityComparer<CodeChanges> {
26+
class CodeChangesEqualityComparer : EqualityComparer<CodeChanges> {
2527
/// <inheritdoc />
26-
public bool Equals (CodeChanges x, CodeChanges y)
28+
public override bool Equals (CodeChanges x, CodeChanges y)
2729
{
2830
// things that mean a code change is the same:
2931
// - the fully qualified symbol is the same
@@ -74,7 +76,7 @@ public bool Equals (CodeChanges x, CodeChanges y)
7476
}
7577

7678
/// <inheritdoc />
77-
public int GetHashCode (CodeChanges obj)
79+
public override int GetHashCode (CodeChanges obj)
7880
{
7981
return HashCode.Combine (obj.FullyQualifiedSymbol, obj.EnumMembers);
8082
}

src/rgen/Microsoft.Macios.Generator/DataModel/Constructor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public bool Equals (Constructor other)
6868
var attrsComparer = new AttributesEqualityComparer ();
6969
if (!attrsComparer.Equals (Attributes, other.Attributes))
7070
return false;
71-
var modifiersComparer = new ModifiersComparer ();
71+
var modifiersComparer = new ModifiersEqualityComparer ();
7272
if (!modifiersComparer.Equals (Modifiers, other.Modifiers))
7373
return false;
7474

src/rgen/Microsoft.Macios.Generator/DataModel/ConstructorsEqualityComparer.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55

66
namespace Microsoft.Macios.Generator.DataModel;
77

8-
class ConstructorsEqualityComparer : IEqualityComparer<ImmutableArray<Constructor>> {
9-
public bool Equals (ImmutableArray<Constructor> x, ImmutableArray<Constructor> y)
8+
class ConstructorsEqualityComparer : EqualityComparer<ImmutableArray<Constructor>> {
9+
/// <inheritdoc/>
10+
public override bool Equals (ImmutableArray<Constructor> x, ImmutableArray<Constructor> y)
1011
{
1112
// group the constructors based on the number of parameters. We create two dictionaries, that will have
1213
// the number of params as the key, and a list of constructors as the value
@@ -19,7 +20,8 @@ public bool Equals (ImmutableArray<Constructor> x, ImmutableArray<Constructor> y
1920
return dictionaryComparer.Equals (xConstructors, yConstructors);
2021
}
2122

22-
public int GetHashCode (ImmutableArray<Constructor> obj)
23+
/// <inheritdoc/>
24+
public override int GetHashCode (ImmutableArray<Constructor> obj)
2325
{
2426
var hashCode = new HashCode ();
2527
foreach (var ctr in obj) {

src/rgen/Microsoft.Macios.Generator/DataModel/EnumMembersEqualityComparer.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55

66
namespace Microsoft.Macios.Generator.DataModel;
77

8-
class EnumMembersEqualityComparer : IEqualityComparer<ImmutableArray<EnumMember>> {
8+
class EnumMembersEqualityComparer : EqualityComparer<ImmutableArray<EnumMember>> {
99

10-
public bool Equals (ImmutableArray<EnumMember> x, ImmutableArray<EnumMember> y)
10+
/// <inheritdoc/>
11+
public override bool Equals (ImmutableArray<EnumMember> x, ImmutableArray<EnumMember> y)
1112
{
1213
if (x.Length != y.Length)
1314
return false;
@@ -20,7 +21,8 @@ public bool Equals (ImmutableArray<EnumMember> x, ImmutableArray<EnumMember> y)
2021
return true;
2122
}
2223

23-
public int GetHashCode (ImmutableArray<EnumMember> obj)
24+
/// <inheritdoc/>
25+
public override int GetHashCode (ImmutableArray<EnumMember> obj)
2426
{
2527
var hash = new HashCode ();
2628
foreach (var change in obj) {

src/rgen/Microsoft.Macios.Generator/DataModel/Event.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public bool Equals (Event other)
5858
if (!attrsComparer.Equals (Attributes, other.Attributes))
5959
return false;
6060

61-
var modifiersComparer = new ModifiersComparer ();
61+
var modifiersComparer = new ModifiersEqualityComparer ();
6262
if (!modifiersComparer.Equals (Modifiers, other.Modifiers))
6363
return false;
6464

src/rgen/Microsoft.Macios.Generator/DataModel/EventEqualityComparer.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55

66
namespace Microsoft.Macios.Generator.DataModel;
77

8-
class EventEqualityComparer : IEqualityComparer<ImmutableArray<Event>> {
8+
class EventEqualityComparer : EqualityComparer<ImmutableArray<Event>> {
99

10-
public bool Equals (ImmutableArray<Event> x, ImmutableArray<Event> y)
10+
/// <inheritdoc/>
11+
public override bool Equals (ImmutableArray<Event> x, ImmutableArray<Event> y)
1112
{
1213
// properties are unique by their name, that means that we can build two dicts and comparethem
1314
var xDictionary = Enumerable.ToDictionary (x, property => property.Name);
@@ -17,7 +18,8 @@ public bool Equals (ImmutableArray<Event> x, ImmutableArray<Event> y)
1718
return comparer.Equals (xDictionary, yDictionary);
1819
}
1920

20-
public int GetHashCode (ImmutableArray<Event> obj)
21+
/// <inheritdoc/>
22+
public override int GetHashCode (ImmutableArray<Event> obj)
2123
{
2224
var hash = new HashCode ();
2325
foreach (var property in obj) {

src/rgen/Microsoft.Macios.Generator/DataModel/Method.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public bool Equals (Method other)
8080
var attrsComparer = new AttributesEqualityComparer ();
8181
if (!attrsComparer.Equals (Attributes, other.Attributes))
8282
return false;
83-
var modifiersComparer = new ModifiersComparer ();
83+
var modifiersComparer = new ModifiersEqualityComparer ();
8484
if (!modifiersComparer.Equals (Modifiers, other.Modifiers))
8585
return false;
8686

src/rgen/Microsoft.Macios.Generator/DataModel/MethodsEqualityComparer.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
namespace Microsoft.Macios.Generator.DataModel;
77

8-
class MethodsEqualityComparer : IEqualityComparer<ImmutableArray<Method>> {
8+
class MethodsEqualityComparer : EqualityComparer<ImmutableArray<Method>> {
99
/// <inheritdoc/>
10-
public bool Equals (ImmutableArray<Method> x, ImmutableArray<Method> y)
10+
public override bool Equals (ImmutableArray<Method> x, ImmutableArray<Method> y)
1111
{
1212
// to compare two lists, we need to do the following:
1313
// 1. Group all the methods by return type + name + param count, this way we
@@ -27,7 +27,7 @@ public bool Equals (ImmutableArray<Method> x, ImmutableArray<Method> y)
2727
}
2828

2929
/// <inheritdoc/>
30-
public int GetHashCode (ImmutableArray<Method> obj)
30+
public override int GetHashCode (ImmutableArray<Method> obj)
3131
{
3232
var hashCode = new HashCode ();
3333
foreach (var ctr in obj) {

src/rgen/Microsoft.Macios.Generator/DataModel/ModifiersComparer.cs renamed to src/rgen/Microsoft.Macios.Generator/DataModel/ModifiersEqualityComparer.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66

77
namespace Microsoft.Macios.Generator.DataModel;
88

9-
public class ModifiersComparer : IEqualityComparer<ImmutableArray<SyntaxToken>> {
10-
public bool Equals (ImmutableArray<SyntaxToken> x, ImmutableArray<SyntaxToken> y)
9+
public class ModifiersEqualityComparer : EqualityComparer<ImmutableArray<SyntaxToken>> {
10+
/// <inheritdoc/>
11+
public override bool Equals (ImmutableArray<SyntaxToken> x, ImmutableArray<SyntaxToken> y)
1112
{
1213
if (x.Length != y.Length)
1314
return false;
@@ -21,7 +22,8 @@ public bool Equals (ImmutableArray<SyntaxToken> x, ImmutableArray<SyntaxToken> y
2122
return true;
2223
}
2324

24-
public int GetHashCode (ImmutableArray<SyntaxToken> obj)
25+
/// <inheritdoc/>
26+
public override int GetHashCode (ImmutableArray<SyntaxToken> obj)
2527
{
2628
var hash = new HashCode ();
2729
foreach (var token in obj) {

src/rgen/Microsoft.Macios.Generator/DataModel/ParameterEqualityComparer.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55

66
namespace Microsoft.Macios.Generator.DataModel;
77

8-
class ParameterEqualityComparer : IEqualityComparer<ImmutableArray<Parameter>> {
8+
class ParameterEqualityComparer : EqualityComparer<ImmutableArray<Parameter>> {
99

1010
/// <inheritdoc/>
11-
public bool Equals (ImmutableArray<Parameter> x, ImmutableArray<Parameter> y)
11+
public override bool Equals (ImmutableArray<Parameter> x, ImmutableArray<Parameter> y)
1212
{
1313
// we know as a fact that parameter names have to be unique, otherwise we could not
1414
// compile the code. So make sure that all the parameters with the same name are the same
@@ -20,7 +20,7 @@ public bool Equals (ImmutableArray<Parameter> x, ImmutableArray<Parameter> y)
2020
}
2121

2222
/// <inheritdoc/>
23-
public int GetHashCode (ImmutableArray<Parameter> obj)
23+
public override int GetHashCode (ImmutableArray<Parameter> obj)
2424
{
2525
var hashCode = new HashCode ();
2626
foreach (var constructor in obj) {

src/rgen/Microsoft.Macios.Generator/DataModel/PropertiesEqualityComparer.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55

66
namespace Microsoft.Macios.Generator.DataModel;
77

8-
class PropertiesEqualityComparer : IEqualityComparer<ImmutableArray<Property>> {
9-
public bool Equals (ImmutableArray<Property> x, ImmutableArray<Property> y)
8+
class PropertiesEqualityComparer : EqualityComparer<ImmutableArray<Property>> {
9+
/// <inheritdoc/>
10+
public override bool Equals (ImmutableArray<Property> x, ImmutableArray<Property> y)
1011
{
1112
// properties are unique by their name, that means that we can build two dicts and comparethem
1213
var xDictionary = Enumerable.ToDictionary (x, property => property.Name);
@@ -16,7 +17,8 @@ public bool Equals (ImmutableArray<Property> x, ImmutableArray<Property> y)
1617
return comparer.Equals (xDictionary, yDictionary);
1718
}
1819

19-
public int GetHashCode (ImmutableArray<Property> obj)
20+
/// <inheritdoc/>
21+
public override int GetHashCode (ImmutableArray<Property> obj)
2022
{
2123
var hash = new HashCode ();
2224
foreach (var property in obj) {

src/rgen/Microsoft.Macios.Generator/DataModel/Property.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public bool Equals (Property other)
6060
if (!attrsComparer.Equals (Attributes, other.Attributes))
6161
return false;
6262

63-
var modifiersComparer = new ModifiersComparer ();
63+
var modifiersComparer = new ModifiersEqualityComparer ();
6464
if (!modifiersComparer.Equals (Modifiers, other.Modifiers))
6565
return false;
6666

src/rgen/Microsoft.Macios.Generator/DictionaryComparer.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@
55
namespace Microsoft.Macios.Generator;
66

77
public class DictionaryComparer<TKey, TValue> (IEqualityComparer<TValue>? valueComparer = null)
8-
: IEqualityComparer<IDictionary<TKey, TValue>>
8+
: EqualityComparer<IDictionary<TKey, TValue>>
99
where TKey : notnull {
1010
readonly IEqualityComparer<TValue> valueComparer = valueComparer ?? EqualityComparer<TValue>.Default;
1111

12-
public bool Equals (IDictionary<TKey, TValue>? x, IDictionary<TKey, TValue>? y)
12+
/// <inheritdoc/>
13+
public override bool Equals (IDictionary<TKey, TValue>? x, IDictionary<TKey, TValue>? y)
1314
{
1415
if (x is null && y is null)
1516
return true;
@@ -24,7 +25,8 @@ public bool Equals (IDictionary<TKey, TValue>? x, IDictionary<TKey, TValue>? y)
2425
return x.All (pair => valueComparer.Equals (pair.Value, y [pair.Key]));
2526
}
2627

27-
public int GetHashCode (IDictionary<TKey, TValue> obj)
28+
/// <inheritdoc/>
29+
public override int GetHashCode (IDictionary<TKey, TValue> obj)
2830
{
2931
var hash = new HashCode ();
3032
foreach (var (key, value) in obj) {

src/rgen/Microsoft.Macios.Generator/ListComparer.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
namespace Microsoft.Macios.Generator;
55

6-
public class ListComparer<T> : IEqualityComparer<List<T>> {
6+
public class ListComparer<T> : EqualityComparer<List<T>> {
77
readonly IComparer<T> comparer;
88
readonly IEqualityComparer<T> valueComparer;
99

@@ -13,7 +13,8 @@ public ListComparer (IComparer<T> sortComparer, IEqualityComparer<T>? equalityCo
1313
valueComparer = equalityComparer ?? EqualityComparer<T>.Default;
1414
}
1515

16-
public bool Equals (List<T>? x, List<T>? y)
16+
/// <inheritdoc/>
17+
public override bool Equals (List<T>? x, List<T>? y)
1718
{
1819
// bases cases for null or diff size
1920
if (x is null && y is null)
@@ -37,7 +38,8 @@ public bool Equals (List<T>? x, List<T>? y)
3738
return true;
3839
}
3940

40-
public int GetHashCode (List<T> obj)
41+
/// <inheritdoc/>
42+
public override int GetHashCode (List<T> obj)
4143
{
4244
var hash = new HashCode ();
4345
foreach (var element in obj) {

0 commit comments

Comments
 (0)