scripts
This commit is contained in:
@@ -0,0 +1,97 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Reflection
|
||||
{
|
||||
/// <summary>Represents a named argument of a custom attribute in the reflection-only context.</summary>
|
||||
// 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;
|
||||
}
|
||||
|
||||
/// <summary>Gets the attribute member that would be used to set the named argument.</summary>
|
||||
/// <returns>A <see cref="T:System.Reflection.MemberInfo" /> representing the attribute member that would be used to set the named argument.</returns>
|
||||
// Token: 0x17000561 RID: 1377
|
||||
// (get) Token: 0x06001DE6 RID: 7654 RVA: 0x000700E0 File Offset: 0x0006E2E0
|
||||
public MemberInfo MemberInfo
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.memberInfo;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Reflection.CustomAttributeTypedArgument" /> structure that can be used to obtain the type and value of the current named argument.</summary>
|
||||
/// <returns>A <see cref="T:System.Reflection.CustomAttributeTypedArgument" /> structure that can be used to obtain the type and value of the current named argument.</returns>
|
||||
// Token: 0x17000562 RID: 1378
|
||||
// (get) Token: 0x06001DE7 RID: 7655 RVA: 0x000700E8 File Offset: 0x0006E2E8
|
||||
public CustomAttributeTypedArgument TypedValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.typedArgument;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns a string consisting of the argument name, the equal sign, and a string representation of the argument value.</summary>
|
||||
/// <returns>A string consisting of the argument name, the equal sign, and a string representation of the argument value.</returns>
|
||||
// Token: 0x06001DE8 RID: 7656 RVA: 0x000700F0 File Offset: 0x0006E2F0
|
||||
public override string ToString()
|
||||
{
|
||||
return this.memberInfo.Name + " = " + this.typedArgument.ToString();
|
||||
}
|
||||
|
||||
/// <returns>true if <paramref name="obj" /> and this instance are the same type and represent the same value; otherwise, false.</returns>
|
||||
/// <param name="obj">Another object to compare to. </param>
|
||||
// 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);
|
||||
}
|
||||
|
||||
/// <returns>A 32-bit signed integer that is the hash code for this instance.</returns>
|
||||
// Token: 0x06001DEA RID: 7658 RVA: 0x00070170 File Offset: 0x0006E370
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return (this.memberInfo.GetHashCode() << 16) + this.typedArgument.GetHashCode();
|
||||
}
|
||||
|
||||
/// <summary>Tests whether two <see cref="T:System.Reflection.CustomAttributeNamedArgument" /> structures are equivalent.</summary>
|
||||
/// <returns>true if the two <see cref="T:System.Reflection.CustomAttributeNamedArgument" /> structures are equal; otherwise, false.</returns>
|
||||
/// <param name="left">The <see cref="T:System.Reflection.CustomAttributeNamedArgument" /> structure to the left of the equality operator.</param>
|
||||
/// <param name="right">The <see cref="T:System.Reflection.CustomAttributeNamedArgument" /> structure to the right of the equality operator.</param>
|
||||
// Token: 0x06001DEB RID: 7659 RVA: 0x0007018C File Offset: 0x0006E38C
|
||||
public static bool operator ==(CustomAttributeNamedArgument left, CustomAttributeNamedArgument right)
|
||||
{
|
||||
return left.Equals(right);
|
||||
}
|
||||
|
||||
/// <summary>Tests whether two <see cref="T:System.Reflection.CustomAttributeNamedArgument" /> structures are different.</summary>
|
||||
/// <returns>true if the two <see cref="T:System.Reflection.CustomAttributeNamedArgument" /> structures are different; otherwise, false.</returns>
|
||||
/// <param name="left">The <see cref="T:System.Reflection.CustomAttributeNamedArgument" /> structure to the left of the inequality operator.</param>
|
||||
/// <param name="right">The <see cref="T:System.Reflection.CustomAttributeNamedArgument" /> structure to the right of the inequality operator.</param>
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user