diff --git a/src/DotNet/SigComparer.cs b/src/DotNet/SigComparer.cs index aab21ce8d..5fbfca772 100644 --- a/src/DotNet/SigComparer.cs +++ b/src/DotNet/SigComparer.cs @@ -21,6 +21,11 @@ public sealed class TypeEqualityComparer : IEqualityComparer, IEqualityCo /// public static readonly TypeEqualityComparer CaseInsensitive = new TypeEqualityComparer(SigComparerOptions.CaseInsensitiveAll); + /// + /// Compares definitions in same module using reference comparison instead of comparing them by name, signature, etc. + /// + public static readonly TypeEqualityComparer CompareReferenceInSameModule = new TypeEqualityComparer(SigComparerOptions.ReferenceCompareForMemberDefsInSameModule); + /// /// Constructor /// @@ -96,6 +101,11 @@ public sealed class FieldEqualityComparer : IEqualityComparer, IEquality /// public static readonly FieldEqualityComparer CaseInsensitiveDontCompareDeclaringTypes = new FieldEqualityComparer(SigComparerOptions.CaseInsensitiveAll); + /// + /// Compares definitions in same module using reference comparison instead of comparing them by name, signature, etc. + /// + public static readonly FieldEqualityComparer CompareReferenceInSameModule = new FieldEqualityComparer(SigComparerOptions.ReferenceCompareForMemberDefsInSameModule); + /// /// Constructor /// @@ -147,6 +157,11 @@ public sealed class MethodEqualityComparer : IEqualityComparer, IEquali /// public static readonly MethodEqualityComparer CaseInsensitiveDontCompareDeclaringTypes = new MethodEqualityComparer(SigComparerOptions.CaseInsensitiveAll); + /// + /// Compares definitions in same module using reference comparison instead of comparing them by name, signature, etc. + /// + public static readonly MethodEqualityComparer CompareReferenceInSameModule = new MethodEqualityComparer(SigComparerOptions.ReferenceCompareForMemberDefsInSameModule); + /// /// Constructor /// @@ -210,6 +225,11 @@ public sealed class PropertyEqualityComparer : IEqualityComparer { /// public static readonly PropertyEqualityComparer CaseInsensitiveDontCompareDeclaringTypes = new PropertyEqualityComparer(SigComparerOptions.CaseInsensitiveAll); + /// + /// Compares definitions in same module using reference comparison instead of comparing them by name, signature, etc. + /// + public static readonly PropertyEqualityComparer CompareReferenceInSameModule = new PropertyEqualityComparer(SigComparerOptions.ReferenceCompareForMemberDefsInSameModule); + /// /// Constructor /// @@ -249,6 +269,11 @@ public sealed class EventEqualityComparer : IEqualityComparer { /// public static readonly EventEqualityComparer CaseInsensitiveDontCompareDeclaringTypes = new EventEqualityComparer(SigComparerOptions.CaseInsensitiveAll); + /// + /// Compares definitions in same module using reference comparison instead of comparing them by name, signature, etc. + /// + public static readonly EventEqualityComparer CompareReferenceInSameModule = new EventEqualityComparer(SigComparerOptions.ReferenceCompareForMemberDefsInSameModule); + /// /// Constructor ///