2 // System.ComponentModel.EditorAttribute.cs
5 // Alejandro Sánchez Acosta (raciel@es.gnu.org)
7 // (C) Alejandro Sánchez Acosta
10 namespace System.ComponentModel {
13 /// Editor Attribute for classes.
16 [AttributeUsage (AttributeTargets.All)]
17 public sealed class EditorAttribute : Attribute {
24 public EditorAttribute ()
29 public EditorAttribute (string typeName, string baseTypeName)
32 basename = baseTypeName;
35 public EditorAttribute (string typeName, Type baseType)
38 this.baseType = baseType;
41 public EditorAttribute (Type type, Type baseType)
44 this.baseType = baseType;
47 public string EditorBaseTypeName {
53 public string EditorTypeName {
59 public override object TypeId {
61 return this.GetType ();
65 public override bool Equals (object o)
67 if (!(obj is EditorAttribute))
70 return (((EditorAttribute) obj).name == name) &&
71 (((EditorAttribute) obj).basename == basename) &&
72 (((EditorAttribute) obj).baseType == baseType) &&
73 (((EditorAttribute) obj).nametype == nametype);
77 public override int GetHashCode ()
82 return name.GetHashCode ();