@@ -7,12 +7,24 @@ namespace AngleSharp.Diffing.Core
7
7
{
8
8
public readonly struct AttributeComparisonSource : IEquatable < AttributeComparisonSource > , IComparisonSource
9
9
{
10
+ /// <summary>
11
+ /// Gets the attribute attached to this source.
12
+ /// </summary>
10
13
public IAttr Attribute { get ; }
11
14
15
+ /// <summary>
16
+ /// Gets the element source this attribute source is related to.
17
+ /// </summary>
12
18
public ComparisonSource ElementSource { get ; }
13
19
20
+ /// <summary>
21
+ /// Gets the path to the attribute in the source node tree.
22
+ /// </summary>
14
23
public string Path { get ; }
15
24
25
+ /// <summary>
26
+ /// Gets the source type, e.g. if it is a test or control source.
27
+ /// </summary>
16
28
public ComparisonSourceType SourceType { get ; }
17
29
18
30
[ SuppressMessage ( "Globalization" , "CA1308:Normalize strings to uppercase" , Justification = "Path should be in lower case" ) ]
@@ -29,13 +41,13 @@ public AttributeComparisonSource(string attributeName, in ComparisonSource eleme
29
41
}
30
42
31
43
#region Equals and HashCode
32
- #pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
44
+ #pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
33
45
public bool Equals ( AttributeComparisonSource other ) => Object . ReferenceEquals ( Attribute , other . Attribute ) && Path . Equals ( other . Path , StringComparison . Ordinal ) && ElementSource . Equals ( other . ElementSource ) ;
34
46
public override int GetHashCode ( ) => ( Attribute , ElementSource ) . GetHashCode ( ) ;
35
47
public override bool Equals ( object ? obj ) => obj is AttributeComparisonSource other && Equals ( other ) ;
36
48
public static bool operator == ( AttributeComparisonSource left , AttributeComparisonSource right ) => left . Equals ( right ) ;
37
49
public static bool operator != ( AttributeComparisonSource left , AttributeComparisonSource right ) => ! left . Equals ( right ) ;
38
- #pragma warning restore CS1591 // Missing XML comment for publicly visible type or member
50
+ #pragma warning restore CS1591 // Missing XML comment for publicly visible type or member
39
51
#endregion
40
52
}
41
53
}
0 commit comments