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>Represents the Token returned by the metadata to represent an event.</summary>
// Token: 0x020001F2 RID: 498
[ComVisible(true)]
[Serializable]
public struct EventToken
{
// Token: 0x06001A0E RID: 6670 RVA: 0x00062870 File Offset: 0x00060A70
internal EventToken(int val)
{
this.tokValue = val;
}
/// <summary>Checks if the given object is an instance of EventToken and is equal to this instance.</summary>
/// <returns>Returns true if <paramref name="obj" /> is an instance of EventToken and equals the current instance; otherwise, false.</returns>
/// <param name="obj">The object to be compared with this instance. </param>
// Token: 0x06001A10 RID: 6672 RVA: 0x00062898 File Offset: 0x00060A98
public override bool Equals(object obj)
{
bool flag = obj is EventToken;
if (flag)
{
EventToken eventToken = (EventToken)obj;
flag = this.tokValue == eventToken.tokValue;
}
return flag;
}
/// <summary>Indicates whether the current instance is equal to the specified <see cref="T:System.Reflection.Emit.EventToken" />.</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.EventToken" /> to compare to the current instance.</param>
// Token: 0x06001A11 RID: 6673 RVA: 0x000628D0 File Offset: 0x00060AD0
public bool Equals(EventToken obj)
{
return this.tokValue == obj.tokValue;
}
/// <summary>Generates the hash code for this event.</summary>
/// <returns>Returns the hash code for this instance.</returns>
// Token: 0x06001A12 RID: 6674 RVA: 0x000628E4 File Offset: 0x00060AE4
public override int GetHashCode()
{
return this.tokValue;
}
/// <summary>Retrieves the metadata token for this event.</summary>
/// <returns>Read-only. Retrieves the metadata token for this event.</returns>
// Token: 0x17000499 RID: 1177
// (get) Token: 0x06001A13 RID: 6675 RVA: 0x000628EC File Offset: 0x00060AEC
public int Token
{
get
{
return this.tokValue;
}
}
/// <summary>Indicates whether two <see cref="T:System.Reflection.Emit.EventToken" /> 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.EventToken" /> to compare to <paramref name="b" />.</param>
/// <param name="b">The <see cref="T:System.Reflection.Emit.EventToken" /> to compare to <paramref name="a" />.</param>
// Token: 0x06001A14 RID: 6676 RVA: 0x000628F4 File Offset: 0x00060AF4
public static bool operator ==(EventToken a, EventToken b)
{
return object.Equals(a, b);
}
/// <summary>Indicates whether two <see cref="T:System.Reflection.Emit.EventToken" /> 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.EventToken" /> to compare to <paramref name="b" />.</param>
/// <param name="b">The <see cref="T:System.Reflection.Emit.EventToken" /> to compare to <paramref name="a" />.</param>
// Token: 0x06001A15 RID: 6677 RVA: 0x00062908 File Offset: 0x00060B08
public static bool operator !=(EventToken a, EventToken b)
{
return !object.Equals(a, b);
}
// Token: 0x040007B0 RID: 1968
internal int tokValue;
/// <summary>The default EventToken with <see cref="P:System.Reflection.Emit.EventToken.Token" /> value 0.</summary>
// Token: 0x040007B1 RID: 1969
public static readonly EventToken Empty = default(EventToken);
}
}