using System; using System.Runtime.InteropServices; namespace System.Reflection { /// Represents a named argument of a custom attribute in the reflection-only context. // Token: 0x0200023B RID: 571 [ComVisible(true)] [Serializable] public struct CustomAttributeNamedArgument { // Token: 0x06001DE5 RID: 7653 RVA: 0x000700C8 File Offset: 0x0006E2C8 internal CustomAttributeNamedArgument(MemberInfo memberInfo, object typedArgument) { this.memberInfo = memberInfo; this.typedArgument = (CustomAttributeTypedArgument)typedArgument; } /// Gets the attribute member that would be used to set the named argument. /// A representing the attribute member that would be used to set the named argument. // Token: 0x17000561 RID: 1377 // (get) Token: 0x06001DE6 RID: 7654 RVA: 0x000700E0 File Offset: 0x0006E2E0 public MemberInfo MemberInfo { get { return this.memberInfo; } } /// Gets a structure that can be used to obtain the type and value of the current named argument. /// A structure that can be used to obtain the type and value of the current named argument. // Token: 0x17000562 RID: 1378 // (get) Token: 0x06001DE7 RID: 7655 RVA: 0x000700E8 File Offset: 0x0006E2E8 public CustomAttributeTypedArgument TypedValue { get { return this.typedArgument; } } /// Returns a string consisting of the argument name, the equal sign, and a string representation of the argument value. /// A string consisting of the argument name, the equal sign, and a string representation of the argument value. // Token: 0x06001DE8 RID: 7656 RVA: 0x000700F0 File Offset: 0x0006E2F0 public override string ToString() { return this.memberInfo.Name + " = " + this.typedArgument.ToString(); } /// true if and this instance are the same type and represent the same value; otherwise, false. /// Another object to compare to. // Token: 0x06001DE9 RID: 7657 RVA: 0x00070120 File Offset: 0x0006E320 public override bool Equals(object obj) { if (!(obj is CustomAttributeNamedArgument)) { return false; } CustomAttributeNamedArgument customAttributeNamedArgument = (CustomAttributeNamedArgument)obj; return customAttributeNamedArgument.memberInfo == this.memberInfo && this.typedArgument.Equals(customAttributeNamedArgument.typedArgument); } /// A 32-bit signed integer that is the hash code for this instance. // Token: 0x06001DEA RID: 7658 RVA: 0x00070170 File Offset: 0x0006E370 public override int GetHashCode() { return (this.memberInfo.GetHashCode() << 16) + this.typedArgument.GetHashCode(); } /// Tests whether two structures are equivalent. /// true if the two structures are equal; otherwise, false. /// The structure to the left of the equality operator. /// The structure to the right of the equality operator. // Token: 0x06001DEB RID: 7659 RVA: 0x0007018C File Offset: 0x0006E38C public static bool operator ==(CustomAttributeNamedArgument left, CustomAttributeNamedArgument right) { return left.Equals(right); } /// Tests whether two structures are different. /// true if the two structures are different; otherwise, false. /// The structure to the left of the inequality operator. /// The structure to the right of the inequality operator. // Token: 0x06001DEC RID: 7660 RVA: 0x0007019C File Offset: 0x0006E39C public static bool operator !=(CustomAttributeNamedArgument left, CustomAttributeNamedArgument right) { return !left.Equals(right); } // Token: 0x04000A24 RID: 2596 private CustomAttributeTypedArgument typedArgument; // Token: 0x04000A25 RID: 2597 private MemberInfo memberInfo; } }