89 lines
3.8 KiB
C#
89 lines
3.8 KiB
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace System.Reflection.Emit
|
|
{
|
|
/// <summary>Represents the Token returned by the metadata to represent a signature.</summary>
|
|
// Token: 0x02000218 RID: 536
|
|
[ComVisible(true)]
|
|
public struct SignatureToken
|
|
{
|
|
// Token: 0x06001C48 RID: 7240 RVA: 0x0006A948 File Offset: 0x00068B48
|
|
internal SignatureToken(int val)
|
|
{
|
|
this.tokValue = val;
|
|
}
|
|
|
|
/// <summary>Checks if the given object is an instance of SignatureToken and is equal to this instance.</summary>
|
|
/// <returns>true if <paramref name="obj" /> is an instance of SignatureToken and is equal to this object; otherwise, false.</returns>
|
|
/// <param name="obj">The object to compare with this SignatureToken. </param>
|
|
// Token: 0x06001C4A RID: 7242 RVA: 0x0006A970 File Offset: 0x00068B70
|
|
public override bool Equals(object obj)
|
|
{
|
|
bool flag = obj is SignatureToken;
|
|
if (flag)
|
|
{
|
|
SignatureToken signatureToken = (SignatureToken)obj;
|
|
flag = this.tokValue == signatureToken.tokValue;
|
|
}
|
|
return flag;
|
|
}
|
|
|
|
/// <summary>Indicates whether the current instance is equal to the specified <see cref="T:System.Reflection.Emit.SignatureToken" />.</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.SignatureToken" /> to compare to the current instance.</param>
|
|
// Token: 0x06001C4B RID: 7243 RVA: 0x0006A9A8 File Offset: 0x00068BA8
|
|
public bool Equals(SignatureToken obj)
|
|
{
|
|
return this.tokValue == obj.tokValue;
|
|
}
|
|
|
|
/// <summary>Generates the hash code for this signature.</summary>
|
|
/// <returns>Returns the hash code for this signature.</returns>
|
|
// Token: 0x06001C4C RID: 7244 RVA: 0x0006A9BC File Offset: 0x00068BBC
|
|
public override int GetHashCode()
|
|
{
|
|
return this.tokValue;
|
|
}
|
|
|
|
/// <summary>Retrieves the metadata token for the local variable signature for this method.</summary>
|
|
/// <returns>Read-only. Retrieves the metadata token of this signature.</returns>
|
|
// Token: 0x17000513 RID: 1299
|
|
// (get) Token: 0x06001C4D RID: 7245 RVA: 0x0006A9C4 File Offset: 0x00068BC4
|
|
public int Token
|
|
{
|
|
get
|
|
{
|
|
return this.tokValue;
|
|
}
|
|
}
|
|
|
|
/// <summary>Indicates whether two <see cref="T:System.Reflection.Emit.SignatureToken" /> 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.SignatureToken" /> to compare to <paramref name="b" />.</param>
|
|
/// <param name="b">The <see cref="T:System.Reflection.Emit.SignatureToken" /> to compare to <paramref name="a" />.</param>
|
|
// Token: 0x06001C4E RID: 7246 RVA: 0x0006A9CC File Offset: 0x00068BCC
|
|
public static bool operator ==(SignatureToken a, SignatureToken b)
|
|
{
|
|
return object.Equals(a, b);
|
|
}
|
|
|
|
/// <summary>Indicates whether two <see cref="T:System.Reflection.Emit.SignatureToken" /> 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.SignatureToken" /> to compare to <paramref name="b" />.</param>
|
|
/// <param name="b">The <see cref="T:System.Reflection.Emit.SignatureToken" /> to compare to <paramref name="a" />.</param>
|
|
// Token: 0x06001C4F RID: 7247 RVA: 0x0006A9E0 File Offset: 0x00068BE0
|
|
public static bool operator !=(SignatureToken a, SignatureToken b)
|
|
{
|
|
return !object.Equals(a, b);
|
|
}
|
|
|
|
// Token: 0x0400098B RID: 2443
|
|
internal int tokValue;
|
|
|
|
/// <summary>The default SignatureToken with <see cref="P:System.Reflection.Emit.SignatureToken.Token" /> value 0.</summary>
|
|
// Token: 0x0400098C RID: 2444
|
|
public static readonly SignatureToken Empty = default(SignatureToken);
|
|
}
|
|
}
|