using System;
using System.Runtime.InteropServices;
namespace System.Reflection.Emit
{
/// The PropertyToken struct is an opaque representation of the Token returned by the metadata to represent a property.
// 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;
}
/// Checks if the given object is an instance of PropertyToken and is equal to this instance.
/// true if is an instance of PropertyToken and equals the current instance; otherwise, false.
/// The object to this object.
// 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;
}
/// Indicates whether the current instance is equal to the specified .
/// true if the value of is equal to the value of the current instance; otherwise, false.
/// The to compare to the current instance.
// Token: 0x06001C22 RID: 7202 RVA: 0x0006A264 File Offset: 0x00068464
public bool Equals(PropertyToken obj)
{
return this.tokValue == obj.tokValue;
}
/// Generates the hash code for this property.
/// Returns the hash code for this property.
// Token: 0x06001C23 RID: 7203 RVA: 0x0006A278 File Offset: 0x00068478
public override int GetHashCode()
{
return this.tokValue;
}
/// Retrieves the metadata token for this property.
/// Read-only. Retrieves the metadata token for this instance.
// Token: 0x17000512 RID: 1298
// (get) Token: 0x06001C24 RID: 7204 RVA: 0x0006A280 File Offset: 0x00068480
public int Token
{
get
{
return this.tokValue;
}
}
/// Indicates whether two structures are equal.
/// true if is equal to ; otherwise, false.
/// The to compare to .
/// The to compare to .
// Token: 0x06001C25 RID: 7205 RVA: 0x0006A288 File Offset: 0x00068488
public static bool operator ==(PropertyToken a, PropertyToken b)
{
return object.Equals(a, b);
}
/// Indicates whether two structures are not equal.
/// true if is not equal to ; otherwise, false.
/// The to compare to .
/// The to compare to .
// 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;
/// The default PropertyToken with value 0.
// Token: 0x0400097D RID: 2429
public static readonly PropertyToken Empty = default(PropertyToken);
}
}