Files
Dec2017-Script-Dump/System/ComponentModel/DesignerCategoryAttribute.cs
T
2026-06-04 11:42:34 +02:00

94 lines
3.9 KiB
C#

using System;
namespace System.ComponentModel
{
/// <summary>Specifies that the designer for a class belongs to a certain category.</summary>
// Token: 0x02000073 RID: 115
[AttributeUsage(AttributeTargets.Class)]
public sealed class DesignerCategoryAttribute : Attribute
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DesignerCategoryAttribute" /> class with an empty string ("").</summary>
// Token: 0x0600042E RID: 1070 RVA: 0x0000C6C4 File Offset: 0x0000A8C4
public DesignerCategoryAttribute()
{
this.category = string.Empty;
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DesignerCategoryAttribute" /> class with the given category name.</summary>
/// <param name="category">The name of the category. </param>
// Token: 0x0600042F RID: 1071 RVA: 0x0000C6D8 File Offset: 0x0000A8D8
public DesignerCategoryAttribute(string category)
{
this.category = category;
}
/// <summary>Gets a unique identifier for this attribute.</summary>
/// <returns>An <see cref="T:System.Object" /> that is a unique identifier for the attribute.</returns>
// Token: 0x1700011A RID: 282
// (get) Token: 0x06000431 RID: 1073 RVA: 0x0000C734 File Offset: 0x0000A934
public override object TypeId
{
get
{
return base.GetType();
}
}
/// <summary>Gets the name of the category.</summary>
/// <returns>The name of the category.</returns>
// Token: 0x1700011B RID: 283
// (get) Token: 0x06000432 RID: 1074 RVA: 0x0000C73C File Offset: 0x0000A93C
public string Category
{
get
{
return this.category;
}
}
/// <summary>Returns whether the value of the given object is equal to the current <see cref="T:System.ComponentModel.DesignOnlyAttribute" />.</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: 0x06000433 RID: 1075 RVA: 0x0000C744 File Offset: 0x0000A944
public override bool Equals(object obj)
{
return obj is DesignerCategoryAttribute && (obj == this || ((DesignerCategoryAttribute)obj).Category == this.category);
}
/// <summary>Returns the hash code for this instance.</summary>
/// <returns>A 32-bit signed integer hash code.</returns>
// Token: 0x06000434 RID: 1076 RVA: 0x0000C780 File Offset: 0x0000A980
public override int GetHashCode()
{
return this.category.GetHashCode();
}
/// <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: 0x06000435 RID: 1077 RVA: 0x0000C790 File Offset: 0x0000A990
public override bool IsDefaultAttribute()
{
return this.category == DesignerCategoryAttribute.Default.Category;
}
// Token: 0x04000158 RID: 344
private string category;
/// <summary>Specifies that a component marked with this category use a component designer. This field is read-only.</summary>
// Token: 0x04000159 RID: 345
public static readonly DesignerCategoryAttribute Component = new DesignerCategoryAttribute("Component");
/// <summary>Specifies that a component marked with this category use a form designer. This static field is read-only.</summary>
// Token: 0x0400015A RID: 346
public static readonly DesignerCategoryAttribute Form = new DesignerCategoryAttribute("Form");
/// <summary>Specifies that a component marked with this category use a generic designer. This static field is read-only.</summary>
// Token: 0x0400015B RID: 347
public static readonly DesignerCategoryAttribute Generic = new DesignerCategoryAttribute("Designer");
/// <summary>Specifies that a component marked with this category cannot use a visual designer. This static field is read-only.</summary>
// Token: 0x0400015C RID: 348
public static readonly DesignerCategoryAttribute Default = new DesignerCategoryAttribute(string.Empty);
}
}