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 MethodToken struct is an object representation of a token that represents a method.</summary>
// Token: 0x02000206 RID: 518
[ComVisible(true)]
[Serializable]
public struct MethodToken
{
// Token: 0x06001B56 RID: 6998 RVA: 0x00066878 File Offset: 0x00064A78
internal MethodToken(int val)
{
this.tokValue = val;
}
/// <summary>Tests whether the given object is equal to this MethodToken object.</summary>
/// <returns>true if <paramref name="obj" /> is an instance of MethodToken and is equal to this object; otherwise, false.</returns>
/// <param name="obj">The object to compare to this object. </param>
// Token: 0x06001B58 RID: 7000 RVA: 0x000668A0 File Offset: 0x00064AA0
public override bool Equals(object obj)
{
bool flag = obj is MethodToken;
if (flag)
{
MethodToken methodToken = (MethodToken)obj;
flag = this.tokValue == methodToken.tokValue;
}
return flag;
}
/// <summary>Indicates whether the current instance is equal to the specified <see cref="T:System.Reflection.Emit.MethodToken" />.</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.MethodToken" /> to compare to the current instance.</param>
// Token: 0x06001B59 RID: 7001 RVA: 0x000668D8 File Offset: 0x00064AD8
public bool Equals(MethodToken obj)
{
return this.tokValue == obj.tokValue;
}
/// <summary>Returns the generated hash code for this method.</summary>
/// <returns>Returns the hash code for this instance.</returns>
// Token: 0x06001B5A RID: 7002 RVA: 0x000668EC File Offset: 0x00064AEC
public override int GetHashCode()
{
return this.tokValue;
}
/// <summary>Returns the metadata token for this method.</summary>
/// <returns>Read-only. Returns the metadata token for this method.</returns>
// Token: 0x170004E8 RID: 1256
// (get) Token: 0x06001B5B RID: 7003 RVA: 0x000668F4 File Offset: 0x00064AF4
public int Token
{
get
{
return this.tokValue;
}
}
/// <summary>Indicates whether two <see cref="T:System.Reflection.Emit.MethodToken" /> 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.MethodToken" /> to compare to <paramref name="b" />.</param>
/// <param name="b">The <see cref="T:System.Reflection.Emit.MethodToken" /> to compare to <paramref name="a" />.</param>
// Token: 0x06001B5C RID: 7004 RVA: 0x000668FC File Offset: 0x00064AFC
public static bool operator ==(MethodToken a, MethodToken b)
{
return object.Equals(a, b);
}
/// <summary>Indicates whether two <see cref="T:System.Reflection.Emit.MethodToken" /> 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.MethodToken" /> to compare to <paramref name="b" />.</param>
/// <param name="b">The <see cref="T:System.Reflection.Emit.MethodToken" /> to compare to <paramref name="a" />.</param>
// Token: 0x06001B5D RID: 7005 RVA: 0x00066910 File Offset: 0x00064B10
public static bool operator !=(MethodToken a, MethodToken b)
{
return !object.Equals(a, b);
}
// Token: 0x04000830 RID: 2096
internal int tokValue;
/// <summary>The default MethodToken with <see cref="P:System.Reflection.Emit.MethodToken.Token" /> value 0.</summary>
// Token: 0x04000831 RID: 2097
public static readonly MethodToken Empty = default(MethodToken);
}
}