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

90 lines
3.9 KiB
C#

using System;
using System.Runtime.InteropServices;
namespace System.Reflection.Emit
{
/// <summary>The ParameterToken struct is an opaque representation of the token returned by the metadata to represent a parameter.</summary>
// Token: 0x02000212 RID: 530
[ComVisible(true)]
[Serializable]
public struct ParameterToken
{
// Token: 0x06001BE5 RID: 7141 RVA: 0x00069D4C File Offset: 0x00067F4C
internal ParameterToken(int val)
{
this.tokValue = val;
}
/// <summary>Checks if the given object is an instance of ParameterToken and is equal to this instance.</summary>
/// <returns>true if <paramref name="obj" /> is an instance of ParameterToken and equals the current instance; otherwise, false.</returns>
/// <param name="obj">The object to compare to this object. </param>
// Token: 0x06001BE7 RID: 7143 RVA: 0x00069D74 File Offset: 0x00067F74
public override bool Equals(object obj)
{
bool flag = obj is ParameterToken;
if (flag)
{
ParameterToken parameterToken = (ParameterToken)obj;
flag = this.tokValue == parameterToken.tokValue;
}
return flag;
}
/// <summary>Indicates whether the current instance is equal to the specified <see cref="T:System.Reflection.Emit.ParameterToken" />.</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.ParameterToken" /> to compare to the current instance.</param>
// Token: 0x06001BE8 RID: 7144 RVA: 0x00069DAC File Offset: 0x00067FAC
public bool Equals(ParameterToken obj)
{
return this.tokValue == obj.tokValue;
}
/// <summary>Generates the hash code for this parameter.</summary>
/// <returns>Returns the hash code for this parameter.</returns>
// Token: 0x06001BE9 RID: 7145 RVA: 0x00069DC0 File Offset: 0x00067FC0
public override int GetHashCode()
{
return this.tokValue;
}
/// <summary>Retrieves the metadata token for this parameter.</summary>
/// <returns>Read-only. Retrieves the metadata token for this parameter.</returns>
// Token: 0x17000501 RID: 1281
// (get) Token: 0x06001BEA RID: 7146 RVA: 0x00069DC8 File Offset: 0x00067FC8
public int Token
{
get
{
return this.tokValue;
}
}
/// <summary>Indicates whether two <see cref="T:System.Reflection.Emit.ParameterToken" /> 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.ParameterToken" /> to compare to <paramref name="b" />.</param>
/// <param name="b">The <see cref="T:System.Reflection.Emit.ParameterToken" /> to compare to <paramref name="a" />.</param>
// Token: 0x06001BEB RID: 7147 RVA: 0x00069DD0 File Offset: 0x00067FD0
public static bool operator ==(ParameterToken a, ParameterToken b)
{
return object.Equals(a, b);
}
/// <summary>Indicates whether two <see cref="T:System.Reflection.Emit.ParameterToken" /> 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.ParameterToken" /> to compare to <paramref name="b" />.</param>
/// <param name="b">The <see cref="T:System.Reflection.Emit.ParameterToken" /> to compare to <paramref name="a" />.</param>
// Token: 0x06001BEC RID: 7148 RVA: 0x00069DE4 File Offset: 0x00067FE4
public static bool operator !=(ParameterToken a, ParameterToken b)
{
return !object.Equals(a, b);
}
// Token: 0x0400096A RID: 2410
internal int tokValue;
/// <summary>The default ParameterToken with <see cref="P:System.Reflection.Emit.ParameterToken.Token" /> value 0.</summary>
// Token: 0x0400096B RID: 2411
public static readonly ParameterToken Empty = default(ParameterToken);
}
}