78 lines
3.9 KiB
C#
78 lines
3.9 KiB
C#
using System;
|
|
|
|
namespace System.ComponentModel
|
|
{
|
|
/// <summary>Indicates that an object's text representation is obscured by characters such as asterisks. This class cannot be inherited.</summary>
|
|
// Token: 0x020000B2 RID: 178
|
|
[AttributeUsage(AttributeTargets.All)]
|
|
public sealed class PasswordPropertyTextAttribute : Attribute
|
|
{
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.PasswordPropertyTextAttribute" /> class. </summary>
|
|
// Token: 0x060005C6 RID: 1478 RVA: 0x0000EF28 File Offset: 0x0000D128
|
|
public PasswordPropertyTextAttribute()
|
|
: this(false)
|
|
{
|
|
}
|
|
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.PasswordPropertyTextAttribute" /> class, optionally showing password text. </summary>
|
|
/// <param name="password">true to indicate that the property should be shown as password text; otherwise, false. The default is false.</param>
|
|
// Token: 0x060005C7 RID: 1479 RVA: 0x0000EF34 File Offset: 0x0000D134
|
|
public PasswordPropertyTextAttribute(bool password)
|
|
{
|
|
this._password = password;
|
|
}
|
|
|
|
/// <summary>Gets a value indicating if the property for which the <see cref="T:System.ComponentModel.PasswordPropertyTextAttribute" /> is defined should be shown as password text.</summary>
|
|
/// <returns>true if the property should be shown as password text; otherwise, false.</returns>
|
|
// Token: 0x17000182 RID: 386
|
|
// (get) Token: 0x060005C9 RID: 1481 RVA: 0x0000EF74 File Offset: 0x0000D174
|
|
public bool Password
|
|
{
|
|
get
|
|
{
|
|
return this._password;
|
|
}
|
|
}
|
|
|
|
/// <summary>Determines whether two <see cref="T:System.ComponentModel.PasswordPropertyTextAttribute" /> instances are equal.</summary>
|
|
/// <returns>true if the specified <see cref="T:System.ComponentModel.PasswordPropertyTextAttribute" /> is equal to the current <see cref="T:System.ComponentModel.PasswordPropertyTextAttribute" />; otherwise, false.</returns>
|
|
/// <param name="o">The <see cref="T:System.ComponentModel.PasswordPropertyTextAttribute" /> to compare with the current <see cref="T:System.ComponentModel.PasswordPropertyTextAttribute" />.</param>
|
|
// Token: 0x060005CA RID: 1482 RVA: 0x0000EF7C File Offset: 0x0000D17C
|
|
public override bool Equals(object o)
|
|
{
|
|
return o is PasswordPropertyTextAttribute && ((PasswordPropertyTextAttribute)o).Password == this.Password;
|
|
}
|
|
|
|
/// <summary>Returns the hash code for this instance.</summary>
|
|
/// <returns>A hash code for the current <see cref="T:System.ComponentModel.PasswordPropertyTextAttribute" />.</returns>
|
|
// Token: 0x060005CB RID: 1483 RVA: 0x0000EFAC File Offset: 0x0000D1AC
|
|
public override int GetHashCode()
|
|
{
|
|
return this.Password.GetHashCode();
|
|
}
|
|
|
|
/// <summary>Returns an indication whether the value of this instance is the default value.</summary>
|
|
/// <returns>true if this instance is the default attribute for the class; otherwise, false.</returns>
|
|
// Token: 0x060005CC RID: 1484 RVA: 0x0000EFC8 File Offset: 0x0000D1C8
|
|
public override bool IsDefaultAttribute()
|
|
{
|
|
return PasswordPropertyTextAttribute.Default.Equals(this);
|
|
}
|
|
|
|
/// <summary>Specifies the default value for the <see cref="T:System.ComponentModel.PasswordPropertyTextAttribute" />.</summary>
|
|
// Token: 0x040001B7 RID: 439
|
|
public static readonly PasswordPropertyTextAttribute Default = PasswordPropertyTextAttribute.No;
|
|
|
|
/// <summary>Specifies that a text property is not used as a password. This static (Shared in Visual Basic) field is read-only.</summary>
|
|
// Token: 0x040001B8 RID: 440
|
|
public static readonly PasswordPropertyTextAttribute No = new PasswordPropertyTextAttribute(false);
|
|
|
|
/// <summary>Specifies that a text property is used as a password. This static (Shared in Visual Basic) field is read-only.</summary>
|
|
// Token: 0x040001B9 RID: 441
|
|
public static readonly PasswordPropertyTextAttribute Yes = new PasswordPropertyTextAttribute(true);
|
|
|
|
// Token: 0x040001BA RID: 442
|
|
private bool _password;
|
|
}
|
|
}
|