Class YamlAssetPathComparer
Equality comparer for YamlAssetPath hwne used as a key in a hashing collection (e.g. Dictionary<TKey, TValue>.
public class YamlAssetPathComparer : EqualityComparer<YamlAssetPath>, IEqualityComparer<YamlAssetPath>, IEqualityComparer
- Inheritance
-
YamlAssetPathComparer
- Implements
- Inherited Members
Remarks
To stay valid the compared YamlAssetPath must not change while used as keys in the hashing collection.
Properties
Default
public static YamlAssetPathComparer Default { get; }
Property Value
Methods
Equals(YamlAssetPath, YamlAssetPath)
When overridden in a derived class, determines whether two objects of type YamlAssetPath are equal.
public override bool Equals(YamlAssetPath x, YamlAssetPath y)
Parameters
x
YamlAssetPathThe first object to compare.
y
YamlAssetPathThe second object to compare.
Returns
GetHashCode(YamlAssetPath)
When overridden in a derived class, serves as a hash function for the specified object for hashing algorithms and data structures, such as a hash table.
public override int GetHashCode(YamlAssetPath obj)
Parameters
obj
YamlAssetPathThe object for which to get a hash code.
Returns
- int
A hash code for the specified object.
Exceptions
- ArgumentNullException
The type of
obj
is a reference type andobj
is null.