Skip to content

Commit 6346069

Browse files
committed
Added docs to AttributeComparisonSource
1 parent 585337d commit 6346069

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

src/AngleSharp.Diffing/Core/AttributeComparisonSource.cs

+14-2
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,24 @@ namespace AngleSharp.Diffing.Core
77
{
88
public readonly struct AttributeComparisonSource : IEquatable<AttributeComparisonSource>, IComparisonSource
99
{
10+
/// <summary>
11+
/// Gets the attribute attached to this source.
12+
/// </summary>
1013
public IAttr Attribute { get; }
1114

15+
/// <summary>
16+
/// Gets the element source this attribute source is related to.
17+
/// </summary>
1218
public ComparisonSource ElementSource { get; }
1319

20+
/// <summary>
21+
/// Gets the path to the attribute in the source node tree.
22+
/// </summary>
1423
public string Path { get; }
1524

25+
/// <summary>
26+
/// Gets the source type, e.g. if it is a test or control source.
27+
/// </summary>
1628
public ComparisonSourceType SourceType { get; }
1729

1830
[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
2941
}
3042

3143
#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
3345
public bool Equals(AttributeComparisonSource other) => Object.ReferenceEquals(Attribute, other.Attribute) && Path.Equals(other.Path, StringComparison.Ordinal) && ElementSource.Equals(other.ElementSource);
3446
public override int GetHashCode() => (Attribute, ElementSource).GetHashCode();
3547
public override bool Equals(object? obj) => obj is AttributeComparisonSource other && Equals(other);
3648
public static bool operator ==(AttributeComparisonSource left, AttributeComparisonSource right) => left.Equals(right);
3749
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
3951
#endregion
4052
}
4153
}

0 commit comments

Comments
 (0)