File tree Expand file tree Collapse file tree 1 file changed +1
-34
lines changed Expand file tree Collapse file tree 1 file changed +1
-34
lines changed Original file line number Diff line number Diff line change @@ -17,37 +17,4 @@ namespace CommunityToolkit.Mvvm.SourceGenerators.Input.Models;
17
17
/// <param name="FilenameHint">The filename hint for the current type.</param>
18
18
/// <param name="TypeName">The fully qualified type name of the target type.</param>
19
19
/// <param name="PropertyNames">The name of validatable properties.</param>
20
- internal sealed record ValidationInfo (
21
- string FilenameHint ,
22
- string TypeName ,
23
- ImmutableArray < string > PropertyNames )
24
- {
25
- /// <inheritdoc/>
26
- public bool Equals ( ValidationInfo ? obj ) => Comparer . Default . Equals ( this , obj ) ;
27
-
28
- /// <inheritdoc/>
29
- public override int GetHashCode ( ) => Comparer . Default . GetHashCode ( this ) ;
30
-
31
- /// <summary>
32
- /// An <see cref="IEqualityComparer{T}"/> implementation for <see cref="ValidationInfo"/>.
33
- /// </summary>
34
- private sealed class Comparer : Comparer < ValidationInfo , Comparer >
35
- {
36
- /// <inheritdoc/>
37
- protected override void AddToHashCode ( ref HashCode hashCode , ValidationInfo obj )
38
- {
39
- hashCode . Add ( obj . FilenameHint ) ;
40
- hashCode . Add ( obj . TypeName ) ;
41
- hashCode . AddRange ( obj . PropertyNames ) ;
42
- }
43
-
44
- /// <inheritdoc/>
45
- protected override bool AreEqual ( ValidationInfo x , ValidationInfo y )
46
- {
47
- return
48
- x . FilenameHint == y . FilenameHint &&
49
- x . TypeName == y . TypeName &&
50
- x . PropertyNames . SequenceEqual ( y . PropertyNames ) ;
51
- }
52
- }
53
- }
20
+ internal sealed record ValidationInfo ( string FilenameHint , string TypeName , EquatableArray < string > PropertyNames ) ;
You can’t perform that action at this time.
0 commit comments