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
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
xYamlAssetPathThe first object to compare.
yYamlAssetPathThe 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
objYamlAssetPathThe object for which to get a hash code.
Returns
- int
A hash code for the specified object.
Exceptions
- ArgumentNullException
The type of
objis a reference type andobjis null.