2 // System.ComponentModel.EditorAttribute.cs
5 // Alejandro Sánchez Acosta (raciel@es.gnu.org)
6 // Andreas Nahr (ClassDevelopment@A-SoftTech.com)
8 // (C) Alejandro Sánchez Acosta
9 // (C) 2003 Andreas Nahr
12 namespace System.ComponentModel {
15 /// Editor Attribute for classes.
17 [AttributeUsage (AttributeTargets.All, AllowMultiple = true, Inherited = true)]
18 public sealed class EditorAttribute : Attribute {
23 public EditorAttribute ()
25 this.name = string.Empty;
28 public EditorAttribute (string typeName, string baseTypeName)
31 basename = baseTypeName;
34 public EditorAttribute (string typeName, Type baseType)
35 : this (typeName, baseType.AssemblyQualifiedName)
39 public EditorAttribute (Type type, Type baseType)
40 : this (type.AssemblyQualifiedName, baseType.AssemblyQualifiedName)
44 public string EditorBaseTypeName {
50 public string EditorTypeName {
56 public override object TypeId {
58 return this.GetType ();
62 public override bool Equals (object obj)
64 if (!(obj is EditorAttribute))
67 return ((EditorAttribute) obj).EditorBaseTypeName.Equals (basename) &&
68 ((EditorAttribute) obj).EditorTypeName.Equals (name);
71 public override int GetHashCode ()
73 return string.Concat(name, basename).GetHashCode ();