86 lines
3.5 KiB
C#
86 lines
3.5 KiB
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace System.Reflection.Emit
|
|
{
|
|
/// <summary>Represents a token that represents a string.</summary>
|
|
// Token: 0x0200021A RID: 538
|
|
[ComVisible(true)]
|
|
[Serializable]
|
|
public struct StringToken
|
|
{
|
|
// Token: 0x06001C50 RID: 7248 RVA: 0x0006A9F8 File Offset: 0x00068BF8
|
|
internal StringToken(int val)
|
|
{
|
|
this.tokValue = val;
|
|
}
|
|
|
|
/// <summary>Checks if the given object is an instance of StringToken and is equal to this instance.</summary>
|
|
/// <returns>true if <paramref name="obj" /> is an instance of StringToken and is equal to this object; otherwise, false.</returns>
|
|
/// <param name="obj">The object to compare with this StringToken. </param>
|
|
// Token: 0x06001C52 RID: 7250 RVA: 0x0006AA08 File Offset: 0x00068C08
|
|
public override bool Equals(object obj)
|
|
{
|
|
bool flag = obj is StringToken;
|
|
if (flag)
|
|
{
|
|
StringToken stringToken = (StringToken)obj;
|
|
flag = this.tokValue == stringToken.tokValue;
|
|
}
|
|
return flag;
|
|
}
|
|
|
|
/// <summary>Indicates whether the current instance is equal to the specified <see cref="T:System.Reflection.Emit.StringToken" />.</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.StringToken" /> to compare to the current instance.</param>
|
|
// Token: 0x06001C53 RID: 7251 RVA: 0x0006AA40 File Offset: 0x00068C40
|
|
public bool Equals(StringToken obj)
|
|
{
|
|
return this.tokValue == obj.tokValue;
|
|
}
|
|
|
|
/// <summary>Returns the hash code for this string.</summary>
|
|
/// <returns>Returns the underlying string token.</returns>
|
|
// Token: 0x06001C54 RID: 7252 RVA: 0x0006AA54 File Offset: 0x00068C54
|
|
public override int GetHashCode()
|
|
{
|
|
return this.tokValue;
|
|
}
|
|
|
|
/// <summary>Retrieves the metadata token for this string.</summary>
|
|
/// <returns>Read-only. Retrieves the metadata token of this string.</returns>
|
|
// Token: 0x17000514 RID: 1300
|
|
// (get) Token: 0x06001C55 RID: 7253 RVA: 0x0006AA5C File Offset: 0x00068C5C
|
|
public int Token
|
|
{
|
|
get
|
|
{
|
|
return this.tokValue;
|
|
}
|
|
}
|
|
|
|
/// <summary>Indicates whether two <see cref="T:System.Reflection.Emit.StringToken" /> 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.StringToken" /> to compare to <paramref name="b" />.</param>
|
|
/// <param name="b">The <see cref="T:System.Reflection.Emit.StringToken" /> to compare to <paramref name="a" />.</param>
|
|
// Token: 0x06001C56 RID: 7254 RVA: 0x0006AA64 File Offset: 0x00068C64
|
|
public static bool operator ==(StringToken a, StringToken b)
|
|
{
|
|
return object.Equals(a, b);
|
|
}
|
|
|
|
/// <summary>Indicates whether two <see cref="T:System.Reflection.Emit.StringToken" /> 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.StringToken" /> to compare to <paramref name="b" />.</param>
|
|
/// <param name="b">The <see cref="T:System.Reflection.Emit.StringToken" /> to compare to <paramref name="a" />.</param>
|
|
// Token: 0x06001C57 RID: 7255 RVA: 0x0006AA78 File Offset: 0x00068C78
|
|
public static bool operator !=(StringToken a, StringToken b)
|
|
{
|
|
return !object.Equals(a, b);
|
|
}
|
|
|
|
// Token: 0x040009AB RID: 2475
|
|
internal int tokValue;
|
|
}
|
|
}
|