using System;
using System.Runtime.InteropServices;
namespace System.Reflection.Emit
{
/// The MethodToken struct is an object representation of a token that represents a method.
// 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;
}
/// Tests whether the given object is equal to this MethodToken object.
/// true if is an instance of MethodToken and is equal to this object; otherwise, false.
/// The object to compare to this object.
// 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;
}
/// Indicates whether the current instance is equal to the specified .
/// true if the value of is equal to the value of the current instance; otherwise, false.
/// The to compare to the current instance.
// Token: 0x06001B59 RID: 7001 RVA: 0x000668D8 File Offset: 0x00064AD8
public bool Equals(MethodToken obj)
{
return this.tokValue == obj.tokValue;
}
/// Returns the generated hash code for this method.
/// Returns the hash code for this instance.
// Token: 0x06001B5A RID: 7002 RVA: 0x000668EC File Offset: 0x00064AEC
public override int GetHashCode()
{
return this.tokValue;
}
/// Returns the metadata token for this method.
/// Read-only. Returns the metadata token for this method.
// Token: 0x170004E8 RID: 1256
// (get) Token: 0x06001B5B RID: 7003 RVA: 0x000668F4 File Offset: 0x00064AF4
public int Token
{
get
{
return this.tokValue;
}
}
/// Indicates whether two structures are equal.
/// true if is equal to ; otherwise, false.
/// The to compare to .
/// The to compare to .
// Token: 0x06001B5C RID: 7004 RVA: 0x000668FC File Offset: 0x00064AFC
public static bool operator ==(MethodToken a, MethodToken b)
{
return object.Equals(a, b);
}
/// Indicates whether two structures are not equal.
/// true if is not equal to ; otherwise, false.
/// The to compare to .
/// The to compare to .
// 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;
/// The default MethodToken with value 0.
// Token: 0x04000831 RID: 2097
public static readonly MethodToken Empty = default(MethodToken);
}
}