@@ -34,60 +34,10 @@ internal sealed record CommandInfo(
34
34
string CommandInterfaceType ,
35
35
string CommandClassType ,
36
36
string DelegateType ,
37
- ImmutableArray < string > CommandTypeArguments ,
38
- ImmutableArray < string > DelegateTypeArguments ,
37
+ EquatableArray < string > CommandTypeArguments ,
38
+ EquatableArray < string > DelegateTypeArguments ,
39
39
string ? CanExecuteMemberName ,
40
40
CanExecuteExpressionType ? CanExecuteExpressionType ,
41
41
bool AllowConcurrentExecutions ,
42
42
bool FlowExceptionsToTaskScheduler ,
43
- bool IncludeCancelCommand )
44
- {
45
- /// <inheritdoc/>
46
- public bool Equals ( CommandInfo ? obj ) => Comparer . Default . Equals ( this , obj ) ;
47
-
48
- /// <inheritdoc/>
49
- public override int GetHashCode ( ) => Comparer . Default . GetHashCode ( this ) ;
50
-
51
- /// <summary>
52
- /// An <see cref="IEqualityComparer{T}"/> implementation for <see cref="CommandInfo"/>.
53
- /// </summary>
54
- private sealed class Comparer : Comparer < CommandInfo , Comparer >
55
- {
56
- /// <inheritdoc/>
57
- protected override void AddToHashCode ( ref HashCode hashCode , CommandInfo obj )
58
- {
59
- hashCode . Add ( obj . MethodName ) ;
60
- hashCode . Add ( obj . FieldName ) ;
61
- hashCode . Add ( obj . PropertyName ) ;
62
- hashCode . Add ( obj . CommandInterfaceType ) ;
63
- hashCode . Add ( obj . CommandClassType ) ;
64
- hashCode . Add ( obj . DelegateType ) ;
65
- hashCode . AddRange ( obj . CommandTypeArguments ) ;
66
- hashCode . AddRange ( obj . DelegateTypeArguments ) ;
67
- hashCode . Add ( obj . CanExecuteMemberName ) ;
68
- hashCode . Add ( obj . CanExecuteExpressionType ) ;
69
- hashCode . Add ( obj . AllowConcurrentExecutions ) ;
70
- hashCode . Add ( obj . FlowExceptionsToTaskScheduler ) ;
71
- hashCode . Add ( obj . IncludeCancelCommand ) ;
72
- }
73
-
74
- /// <inheritdoc/>
75
- protected override bool AreEqual ( CommandInfo x , CommandInfo y )
76
- {
77
- return
78
- x . MethodName == y . MethodName &&
79
- x . FieldName == y . FieldName &&
80
- x . PropertyName == y . PropertyName &&
81
- x . CommandInterfaceType == y . CommandInterfaceType &&
82
- x . CommandClassType == y . CommandClassType &&
83
- x . DelegateType == y . DelegateType &&
84
- x . CommandTypeArguments . SequenceEqual ( y . CommandTypeArguments ) &&
85
- x . DelegateTypeArguments . SequenceEqual ( y . CommandTypeArguments ) &&
86
- x . CanExecuteMemberName == y . CanExecuteMemberName &&
87
- x . CanExecuteExpressionType == y . CanExecuteExpressionType &&
88
- x . AllowConcurrentExecutions == y . AllowConcurrentExecutions &&
89
- x . FlowExceptionsToTaskScheduler == y . FlowExceptionsToTaskScheduler &&
90
- x . IncludeCancelCommand == y . IncludeCancelCommand ;
91
- }
92
- }
93
- }
43
+ bool IncludeCancelCommand ) ;
0 commit comments