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

103 lines
4.6 KiB
C#

using System;
namespace System.ComponentModel
{
/// <summary>Specifies the editor to use to change a property. This class cannot be inherited.</summary>
// Token: 0x02000079 RID: 121
[AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = true)]
public sealed class EditorAttribute : Attribute
{
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.EditorAttribute" /> class with the default editor, which is no editor.</summary>
// Token: 0x0600044F RID: 1103 RVA: 0x0000C998 File Offset: 0x0000AB98
public EditorAttribute()
{
this.name = string.Empty;
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.EditorAttribute" /> class with the type name and base type name of the editor.</summary>
/// <param name="typeName">The fully qualified type name of the editor. </param>
/// <param name="baseTypeName">The fully qualified type name of the base class or interface to use as a lookup key for the editor. This class must be or derive from <see cref="T:System.Drawing.Design.UITypeEditor" />. </param>
// Token: 0x06000450 RID: 1104 RVA: 0x0000C9AC File Offset: 0x0000ABAC
public EditorAttribute(string typeName, string baseTypeName)
{
this.name = typeName;
this.basename = baseTypeName;
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.EditorAttribute" /> class with the type name and the base type.</summary>
/// <param name="typeName">The fully qualified type name of the editor. </param>
/// <param name="baseType">The <see cref="T:System.Type" /> of the base class or interface to use as a lookup key for the editor. This class must be or derive from <see cref="T:System.Drawing.Design.UITypeEditor" />. </param>
// Token: 0x06000451 RID: 1105 RVA: 0x0000C9C4 File Offset: 0x0000ABC4
public EditorAttribute(string typeName, Type baseType)
: this(typeName, baseType.AssemblyQualifiedName)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.EditorAttribute" /> class with the type and the base type.</summary>
/// <param name="type">A <see cref="T:System.Type" /> that represents the type of the editor. </param>
/// <param name="baseType">The <see cref="T:System.Type" /> of the base class or interface to use as a lookup key for the editor. This class must be or derive from <see cref="T:System.Drawing.Design.UITypeEditor" />. </param>
// Token: 0x06000452 RID: 1106 RVA: 0x0000C9D4 File Offset: 0x0000ABD4
public EditorAttribute(Type type, Type baseType)
: this(type.AssemblyQualifiedName, baseType.AssemblyQualifiedName)
{
}
/// <summary>Gets the name of the base class or interface serving as a lookup key for this editor.</summary>
/// <returns>The name of the base class or interface serving as a lookup key for this editor.</returns>
// Token: 0x17000123 RID: 291
// (get) Token: 0x06000453 RID: 1107 RVA: 0x0000C9E8 File Offset: 0x0000ABE8
public string EditorBaseTypeName
{
get
{
return this.basename;
}
}
/// <summary>Gets the name of the editor class in the <see cref="P:System.Type.AssemblyQualifiedName" /> format.</summary>
/// <returns>The name of the editor class in the <see cref="P:System.Type.AssemblyQualifiedName" /> format.</returns>
// Token: 0x17000124 RID: 292
// (get) Token: 0x06000454 RID: 1108 RVA: 0x0000C9F0 File Offset: 0x0000ABF0
public string EditorTypeName
{
get
{
return this.name;
}
}
/// <summary>Gets a unique ID for this attribute type.</summary>
/// <returns>A unique ID for this attribute type.</returns>
// Token: 0x17000125 RID: 293
// (get) Token: 0x06000455 RID: 1109 RVA: 0x0000C9F8 File Offset: 0x0000ABF8
public override object TypeId
{
get
{
return base.GetType();
}
}
/// <summary>Returns whether the value of the given object is equal to the current <see cref="T:System.ComponentModel.EditorAttribute" />.</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 object to test the value equality of. </param>
// Token: 0x06000456 RID: 1110 RVA: 0x0000CA00 File Offset: 0x0000AC00
public override bool Equals(object obj)
{
return obj is EditorAttribute && ((EditorAttribute)obj).EditorBaseTypeName.Equals(this.basename) && ((EditorAttribute)obj).EditorTypeName.Equals(this.name);
}
// Token: 0x06000457 RID: 1111 RVA: 0x0000CA50 File Offset: 0x0000AC50
public override int GetHashCode()
{
return (this.name + this.basename).GetHashCode();
}
// Token: 0x0400016B RID: 363
private string name;
// Token: 0x0400016C RID: 364
private string basename;
}
}