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

128 lines
6.1 KiB
C#

using System;
using System.ComponentModel.Design;
namespace System.ComponentModel
{
/// <summary>Specifies the class used to implement design-time services for a component.</summary>
// Token: 0x02000072 RID: 114
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, AllowMultiple = true, Inherited = true)]
public sealed class DesignerAttribute : Attribute
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DesignerAttribute" /> class using the name of the type that provides design-time services.</summary>
/// <param name="designerTypeName">The concatenation of the fully qualified name of the type that provides design-time services for the component this attribute is bound to, and the name of the assembly this type resides in. </param>
// Token: 0x06000424 RID: 1060 RVA: 0x0000C56C File Offset: 0x0000A76C
public DesignerAttribute(string designerTypeName)
{
if (designerTypeName == null)
{
throw new NullReferenceException();
}
this.name = designerTypeName;
this.basetypename = typeof(global::System.ComponentModel.Design.IDesigner).FullName;
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DesignerAttribute" /> class using the type that provides design-time services.</summary>
/// <param name="designerType">A <see cref="T:System.Type" /> that represents the class that provides design-time services for the component this attribute is bound to. </param>
// Token: 0x06000425 RID: 1061 RVA: 0x0000C5A8 File Offset: 0x0000A7A8
public DesignerAttribute(Type designerType)
: this(designerType.AssemblyQualifiedName)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DesignerAttribute" /> class, using the name of the designer class and the base class for the designer.</summary>
/// <param name="designerTypeName">The concatenation of the fully qualified name of the type that provides design-time services for the component this attribute is bound to, and the name of the assembly this type resides in. </param>
/// <param name="designerBaseType">A <see cref="T:System.Type" /> that represents the base class to associate with the <paramref name="designerTypeName" />. </param>
// Token: 0x06000426 RID: 1062 RVA: 0x0000C5B8 File Offset: 0x0000A7B8
public DesignerAttribute(string designerTypeName, Type designerBaseType)
: this(designerTypeName, designerBaseType.AssemblyQualifiedName)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DesignerAttribute" /> class using the types of the designer and designer base class.</summary>
/// <param name="designerType">A <see cref="T:System.Type" /> that represents the class that provides design-time services for the component this attribute is bound to. </param>
/// <param name="designerBaseType">A <see cref="T:System.Type" /> that represents the base class to associate with the <paramref name="designerType" />. </param>
// Token: 0x06000427 RID: 1063 RVA: 0x0000C5C8 File Offset: 0x0000A7C8
public DesignerAttribute(Type designerType, Type designerBaseType)
: this(designerType.AssemblyQualifiedName, designerBaseType.AssemblyQualifiedName)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DesignerAttribute" /> class using the designer type and the base class for the designer.</summary>
/// <param name="designerTypeName">The concatenation of the fully qualified name of the type that provides design-time services for the component this attribute is bound to, and the name of the assembly this type resides in. </param>
/// <param name="designerBaseTypeName">The fully qualified name of the base class to associate with the designer class. </param>
// Token: 0x06000428 RID: 1064 RVA: 0x0000C5DC File Offset: 0x0000A7DC
public DesignerAttribute(string designerTypeName, string designerBaseTypeName)
{
if (designerTypeName == null)
{
throw new NullReferenceException();
}
this.name = designerTypeName;
this.basetypename = designerBaseTypeName;
}
/// <summary>Gets the name of the base type of this designer.</summary>
/// <returns>The name of the base type of this designer.</returns>
// Token: 0x17000117 RID: 279
// (get) Token: 0x06000429 RID: 1065 RVA: 0x0000C60C File Offset: 0x0000A80C
public string DesignerBaseTypeName
{
get
{
return this.basetypename;
}
}
/// <summary>Gets the name of the designer type associated with this designer attribute.</summary>
/// <returns>The name of the designer type associated with this designer attribute.</returns>
// Token: 0x17000118 RID: 280
// (get) Token: 0x0600042A RID: 1066 RVA: 0x0000C614 File Offset: 0x0000A814
public string DesignerTypeName
{
get
{
return this.name;
}
}
/// <summary>Gets a unique ID for this attribute type.</summary>
/// <returns>A unique ID for this attribute type.</returns>
// Token: 0x17000119 RID: 281
// (get) Token: 0x0600042B RID: 1067 RVA: 0x0000C61C File Offset: 0x0000A81C
public override object TypeId
{
get
{
string text = this.basetypename;
int num = text.IndexOf(',');
if (num != -1)
{
text = text.Substring(0, num);
}
return base.GetType().ToString() + text;
}
}
/// <summary>Returns whether the value of the given object is equal to the current <see cref="T:System.ComponentModel.DesignerAttribute" />.</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: 0x0600042C RID: 1068 RVA: 0x0000C65C File Offset: 0x0000A85C
public override bool Equals(object obj)
{
return obj is DesignerAttribute && ((DesignerAttribute)obj).DesignerBaseTypeName.Equals(this.basetypename) && ((DesignerAttribute)obj).DesignerTypeName.Equals(this.name);
}
// Token: 0x0600042D RID: 1069 RVA: 0x0000C6AC File Offset: 0x0000A8AC
public override int GetHashCode()
{
return (this.name + this.basetypename).GetHashCode();
}
// Token: 0x04000156 RID: 342
private string name;
// Token: 0x04000157 RID: 343
private string basetypename;
}
}