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

85 lines
3.2 KiB
C#

using System;
namespace System.ComponentModel
{
/// <summary>Specifies a description for a property or event.</summary>
// Token: 0x0200006F RID: 111
[AttributeUsage(AttributeTargets.All)]
public class DescriptionAttribute : Attribute
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DescriptionAttribute" /> class with no parameters.</summary>
// Token: 0x0600040E RID: 1038 RVA: 0x0000C3A4 File Offset: 0x0000A5A4
public DescriptionAttribute()
{
this.desc = string.Empty;
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DescriptionAttribute" /> class with a description.</summary>
/// <param name="description">The description text. </param>
// Token: 0x0600040F RID: 1039 RVA: 0x0000C3B8 File Offset: 0x0000A5B8
public DescriptionAttribute(string name)
{
this.desc = name;
}
/// <summary>Gets the description stored in this attribute.</summary>
/// <returns>The description stored in this attribute.</returns>
// Token: 0x17000113 RID: 275
// (get) Token: 0x06000411 RID: 1041 RVA: 0x0000C3D4 File Offset: 0x0000A5D4
public virtual string Description
{
get
{
return this.DescriptionValue;
}
}
/// <summary>Gets or sets the string stored as the description.</summary>
/// <returns>The string stored as the description. The default value is an empty string ("").</returns>
// Token: 0x17000114 RID: 276
// (get) Token: 0x06000412 RID: 1042 RVA: 0x0000C3DC File Offset: 0x0000A5DC
// (set) Token: 0x06000413 RID: 1043 RVA: 0x0000C3E4 File Offset: 0x0000A5E4
protected string DescriptionValue
{
get
{
return this.desc;
}
set
{
this.desc = value;
}
}
/// <summary>Returns whether the value of the given object is equal to the current <see cref="T:System.ComponentModel.DescriptionAttribute" />.</summary>
/// <returns>true if the value of the given object is equal to that of the current; otherwise, false.</returns>
/// <param name="obj">The object to test the value equality of. </param>
// Token: 0x06000414 RID: 1044 RVA: 0x0000C3F0 File Offset: 0x0000A5F0
public override bool Equals(object obj)
{
return obj is DescriptionAttribute && (obj == this || ((DescriptionAttribute)obj).Description == this.desc);
}
// Token: 0x06000415 RID: 1045 RVA: 0x0000C42C File Offset: 0x0000A62C
public override int GetHashCode()
{
return this.desc.GetHashCode();
}
/// <summary>Returns a value indicating whether this is the default <see cref="T:System.ComponentModel.DescriptionAttribute" /> instance.</summary>
/// <returns>true, if this is the default <see cref="T:System.ComponentModel.DescriptionAttribute" /> instance; otherwise, false.</returns>
// Token: 0x06000416 RID: 1046 RVA: 0x0000C43C File Offset: 0x0000A63C
public override bool IsDefaultAttribute()
{
return this == DescriptionAttribute.Default;
}
// Token: 0x0400014C RID: 332
private string desc;
/// <summary>Specifies the default value for the <see cref="T:System.ComponentModel.DescriptionAttribute" />, which is an empty string (""). This static field is read-only.</summary>
// Token: 0x0400014D RID: 333
public static readonly DescriptionAttribute Default = new DescriptionAttribute();
}
}