90 lines
3.8 KiB
C#
90 lines
3.8 KiB
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace System.Reflection.Emit
|
|
{
|
|
/// <summary>The PropertyToken struct is an opaque representation of the Token returned by the metadata to represent a property.</summary>
|
|
// Token: 0x02000215 RID: 533
|
|
[ComVisible(true)]
|
|
[Serializable]
|
|
public struct PropertyToken
|
|
{
|
|
// Token: 0x06001C1F RID: 7199 RVA: 0x0006A204 File Offset: 0x00068404
|
|
internal PropertyToken(int val)
|
|
{
|
|
this.tokValue = val;
|
|
}
|
|
|
|
/// <summary>Checks if the given object is an instance of PropertyToken and is equal to this instance.</summary>
|
|
/// <returns>true if <paramref name="obj" /> is an instance of PropertyToken and equals the current instance; otherwise, false.</returns>
|
|
/// <param name="obj">The object to this object. </param>
|
|
// Token: 0x06001C21 RID: 7201 RVA: 0x0006A22C File Offset: 0x0006842C
|
|
public override bool Equals(object obj)
|
|
{
|
|
bool flag = obj is PropertyToken;
|
|
if (flag)
|
|
{
|
|
PropertyToken propertyToken = (PropertyToken)obj;
|
|
flag = this.tokValue == propertyToken.tokValue;
|
|
}
|
|
return flag;
|
|
}
|
|
|
|
/// <summary>Indicates whether the current instance is equal to the specified <see cref="T:System.Reflection.Emit.PropertyToken" />.</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.PropertyToken" /> to compare to the current instance.</param>
|
|
// Token: 0x06001C22 RID: 7202 RVA: 0x0006A264 File Offset: 0x00068464
|
|
public bool Equals(PropertyToken obj)
|
|
{
|
|
return this.tokValue == obj.tokValue;
|
|
}
|
|
|
|
/// <summary>Generates the hash code for this property.</summary>
|
|
/// <returns>Returns the hash code for this property.</returns>
|
|
// Token: 0x06001C23 RID: 7203 RVA: 0x0006A278 File Offset: 0x00068478
|
|
public override int GetHashCode()
|
|
{
|
|
return this.tokValue;
|
|
}
|
|
|
|
/// <summary>Retrieves the metadata token for this property.</summary>
|
|
/// <returns>Read-only. Retrieves the metadata token for this instance.</returns>
|
|
// Token: 0x17000512 RID: 1298
|
|
// (get) Token: 0x06001C24 RID: 7204 RVA: 0x0006A280 File Offset: 0x00068480
|
|
public int Token
|
|
{
|
|
get
|
|
{
|
|
return this.tokValue;
|
|
}
|
|
}
|
|
|
|
/// <summary>Indicates whether two <see cref="T:System.Reflection.Emit.PropertyToken" /> 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.PropertyToken" /> to compare to <paramref name="b" />.</param>
|
|
/// <param name="b">The <see cref="T:System.Reflection.Emit.PropertyToken" /> to compare to <paramref name="a" />.</param>
|
|
// Token: 0x06001C25 RID: 7205 RVA: 0x0006A288 File Offset: 0x00068488
|
|
public static bool operator ==(PropertyToken a, PropertyToken b)
|
|
{
|
|
return object.Equals(a, b);
|
|
}
|
|
|
|
/// <summary>Indicates whether two <see cref="T:System.Reflection.Emit.PropertyToken" /> 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.PropertyToken" /> to compare to <paramref name="b" />.</param>
|
|
/// <param name="b">The <see cref="T:System.Reflection.Emit.PropertyToken" /> to compare to <paramref name="a" />.</param>
|
|
// Token: 0x06001C26 RID: 7206 RVA: 0x0006A29C File Offset: 0x0006849C
|
|
public static bool operator !=(PropertyToken a, PropertyToken b)
|
|
{
|
|
return !object.Equals(a, b);
|
|
}
|
|
|
|
// Token: 0x0400097C RID: 2428
|
|
internal int tokValue;
|
|
|
|
/// <summary>The default PropertyToken with <see cref="P:System.Reflection.Emit.PropertyToken.Token" /> value 0.</summary>
|
|
// Token: 0x0400097D RID: 2429
|
|
public static readonly PropertyToken Empty = default(PropertyToken);
|
|
}
|
|
}
|