mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-06-28 11:26:24 +02:00
29 lines
660 B
C#
29 lines
660 B
C#
using System;
|
|
|
|
namespace Spv.Generator
|
|
{
|
|
internal class DeterministicStringKey : IEquatable<DeterministicStringKey>
|
|
{
|
|
private readonly string _value;
|
|
|
|
public DeterministicStringKey(string value)
|
|
{
|
|
_value = value;
|
|
}
|
|
|
|
public override int GetHashCode()
|
|
{
|
|
return DeterministicHashCode.GetHashCode(_value);
|
|
}
|
|
|
|
public bool Equals(DeterministicStringKey other)
|
|
{
|
|
return _value == other?._value;
|
|
}
|
|
|
|
public override bool Equals(object obj)
|
|
{
|
|
return obj is DeterministicStringKey key && Equals(key);
|
|
}
|
|
}
|
|
}
|