| namespace Google.Protobuf
|
| /// Struct used to hold the keys for the fieldByNumber table in DescriptorPool and the keys for the |
| /// extensionByNumber table in ExtensionRegistry. |
| internal struct ObjectIntPair<T> : IEquatable<ObjectIntPair<T>> where T : class
|
| private readonly int number;
|
| internal ObjectIntPair(T obj, int number)
|
| public bool Equals(ObjectIntPair<T> other)
|
| && number == other.number;
|
| public override bool Equals(object obj)
|
| if (obj is ObjectIntPair<T>)
|
| return Equals((ObjectIntPair<T>)obj);
|
| public override int GetHashCode()
|
| return obj.GetHashCode() * ((1 << 16) - 1) + number;
|