Files
2026-06-04 11:42:34 +02:00

90 lines
3.7 KiB
C#

using System;
using System.Runtime.InteropServices;
namespace System.Reflection.Emit
{
/// <summary>The FieldToken struct is an object representation of a token that represents a field.</summary>
// Token: 0x020001F5 RID: 501
[ComVisible(true)]
[Serializable]
public struct FieldToken
{
// Token: 0x06001A40 RID: 6720 RVA: 0x00062DAC File Offset: 0x00060FAC
internal FieldToken(int val)
{
this.tokValue = val;
}
/// <summary>Determines if an object is an instance of FieldToken and is equal to this instance.</summary>
/// <returns>Returns true if <paramref name="obj" /> is an instance of FieldToken and is equal to this object; otherwise, false.</returns>
/// <param name="obj">The object to compare to this FieldToken. </param>
// Token: 0x06001A42 RID: 6722 RVA: 0x00062DD4 File Offset: 0x00060FD4
public override bool Equals(object obj)
{
bool flag = obj is FieldToken;
if (flag)
{
FieldToken fieldToken = (FieldToken)obj;
flag = this.tokValue == fieldToken.tokValue;
}
return flag;
}
/// <summary>Indicates whether the current instance is equal to the specified <see cref="T:System.Reflection.Emit.FieldToken" />.</summary>
/// <returns>true if the value of <paramref name="obj" /> is equal to the value of the current instance; otherwise, false.</returns>
/// <param name="obj">The <see cref="T:System.Reflection.Emit.FieldToken" /> to compare to the current instance.</param>
// Token: 0x06001A43 RID: 6723 RVA: 0x00062E0C File Offset: 0x0006100C
public bool Equals(FieldToken obj)
{
return this.tokValue == obj.tokValue;
}
/// <summary>Generates the hash code for this field.</summary>
/// <returns>Returns the hash code for this instance.</returns>
// Token: 0x06001A44 RID: 6724 RVA: 0x00062E20 File Offset: 0x00061020
public override int GetHashCode()
{
return this.tokValue;
}
/// <summary>Retrieves the metadata token for this field.</summary>
/// <returns>Read-only. Retrieves the metadata token of this field.</returns>
// Token: 0x170004A9 RID: 1193
// (get) Token: 0x06001A45 RID: 6725 RVA: 0x00062E28 File Offset: 0x00061028
public int Token
{
get
{
return this.tokValue;
}
}
/// <summary>Indicates whether two <see cref="T:System.Reflection.Emit.FieldToken" /> structures are equal.</summary>
/// <returns>true if <paramref name="a" /> is equal to <paramref name="b" />; otherwise, false.</returns>
/// <param name="a">The <see cref="T:System.Reflection.Emit.FieldToken" /> to compare to <paramref name="b" />.</param>
/// <param name="b">The <see cref="T:System.Reflection.Emit.FieldToken" /> to compare to <paramref name="a" />.</param>
// Token: 0x06001A46 RID: 6726 RVA: 0x00062E30 File Offset: 0x00061030
public static bool operator ==(FieldToken a, FieldToken b)
{
return object.Equals(a, b);
}
/// <summary>Indicates whether two <see cref="T:System.Reflection.Emit.FieldToken" /> structures are not equal.</summary>
/// <returns>true if <paramref name="a" /> is not equal to <paramref name="b" />; otherwise, false.</returns>
/// <param name="a">The <see cref="T:System.Reflection.Emit.FieldToken" /> to compare to <paramref name="b" />.</param>
/// <param name="b">The <see cref="T:System.Reflection.Emit.FieldToken" /> to compare to <paramref name="a" />.</param>
// Token: 0x06001A47 RID: 6727 RVA: 0x00062E44 File Offset: 0x00061044
public static bool operator !=(FieldToken a, FieldToken b)
{
return !object.Equals(a, b);
}
// Token: 0x040007C1 RID: 1985
internal int tokValue;
/// <summary>The default FieldToken with <see cref="P:System.Reflection.Emit.FieldToken.Token" /> value 0.</summary>
// Token: 0x040007C2 RID: 1986
public static readonly FieldToken Empty = default(FieldToken);
}
}