Files
2026-06-04 11:42:34 +02:00

92 lines
3.6 KiB
C#

using System;
namespace System.ComponentModel
{
/// <summary>Specifies the display name for a property, event, or public void method which takes no arguments. </summary>
// Token: 0x02000076 RID: 118
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Event)]
public class DisplayNameAttribute : Attribute
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DisplayNameAttribute" /> class.</summary>
// Token: 0x0600043C RID: 1084 RVA: 0x0000C850 File Offset: 0x0000AA50
public DisplayNameAttribute()
{
this.attributeDisplayName = string.Empty;
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DisplayNameAttribute" /> class using the display name.</summary>
/// <param name="displayName">The display name.</param>
// Token: 0x0600043D RID: 1085 RVA: 0x0000C864 File Offset: 0x0000AA64
public DisplayNameAttribute(string displayName)
{
this.attributeDisplayName = displayName;
}
/// <summary>Determines if this attribute is the default.</summary>
/// <returns>true if the attribute is the default value for this attribute class; otherwise, false.</returns>
// Token: 0x0600043F RID: 1087 RVA: 0x0000C880 File Offset: 0x0000AA80
public override bool IsDefaultAttribute()
{
return this.attributeDisplayName != null && this.attributeDisplayName.Length == 0;
}
/// <summary>Returns the hash code for this instance.</summary>
/// <returns>A hash code for the current <see cref="T:System.ComponentModel.DisplayNameAttribute" />.</returns>
// Token: 0x06000440 RID: 1088 RVA: 0x0000C8A0 File Offset: 0x0000AAA0
public override int GetHashCode()
{
return this.attributeDisplayName.GetHashCode();
}
/// <summary>Determines whether two <see cref="T:System.ComponentModel.DisplayNameAttribute" /> instances are equal.</summary>
/// <returns>true if the value of the given object is equal to that of the current object; otherwise, false.</returns>
/// <param name="obj">The <see cref="T:System.ComponentModel.DisplayNameAttribute" /> to test the value equality of.</param>
// Token: 0x06000441 RID: 1089 RVA: 0x0000C8B0 File Offset: 0x0000AAB0
public override bool Equals(object obj)
{
if (obj == this)
{
return true;
}
DisplayNameAttribute displayNameAttribute = obj as DisplayNameAttribute;
return displayNameAttribute != null && displayNameAttribute.DisplayName == this.attributeDisplayName;
}
/// <summary>Gets the display name for a property, event, or public void method that takes no arguments stored in this attribute.</summary>
/// <returns>The display name.</returns>
// Token: 0x1700011D RID: 285
// (get) Token: 0x06000442 RID: 1090 RVA: 0x0000C8E8 File Offset: 0x0000AAE8
public virtual string DisplayName
{
get
{
return this.attributeDisplayName;
}
}
/// <summary>Gets or sets the display name.</summary>
/// <returns>The display name.</returns>
// Token: 0x1700011E RID: 286
// (get) Token: 0x06000443 RID: 1091 RVA: 0x0000C8F0 File Offset: 0x0000AAF0
// (set) Token: 0x06000444 RID: 1092 RVA: 0x0000C8F8 File Offset: 0x0000AAF8
protected string DisplayNameValue
{
get
{
return this.attributeDisplayName;
}
set
{
this.attributeDisplayName = value;
}
}
/// <summary>Specifies the default value for the <see cref="T:System.ComponentModel.DisplayNameAttribute" />. This field is read-only.</summary>
// Token: 0x04000166 RID: 358
public static readonly DisplayNameAttribute Default = new DisplayNameAttribute();
// Token: 0x04000167 RID: 359
private string attributeDisplayName;
}
}