using System;
namespace System.ComponentModel
{
/// Represents an attribute of a toolbox item.
// Token: 0x020000C4 RID: 196
[AttributeUsage(AttributeTargets.All)]
public class ToolboxItemAttribute : Attribute
{
/// Initializes a new instance of the class and specifies whether to use default initialization values.
/// true to create a toolbox item attribute for a default type; false to associate no default toolbox item support for this attribute.
// Token: 0x06000670 RID: 1648 RVA: 0x00010E54 File Offset: 0x0000F054
public ToolboxItemAttribute(bool defaultType)
{
if (defaultType)
{
this.itemTypeName = "System.Drawing.Design.ToolboxItem, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
}
}
/// Initializes a new instance of the class using the specified name of the type.
/// The names of the type of the toolbox item and of the assembly that contains the type.
// Token: 0x06000671 RID: 1649 RVA: 0x00010E70 File Offset: 0x0000F070
public ToolboxItemAttribute(string toolboxItemName)
{
this.itemTypeName = toolboxItemName;
}
/// Initializes a new instance of the class using the specified type of the toolbox item.
/// The type of the toolbox item.
// Token: 0x06000672 RID: 1650 RVA: 0x00010E80 File Offset: 0x0000F080
public ToolboxItemAttribute(Type toolboxItemType)
{
this.itemType = toolboxItemType;
}
/// Gets or sets the type of the toolbox item.
/// The type of the toolbox item.
/// The type cannot be found.
///
///
///
// Token: 0x170001AA RID: 426
// (get) Token: 0x06000674 RID: 1652 RVA: 0x00010EAC File Offset: 0x0000F0AC
public Type ToolboxItemType
{
get
{
if (this.itemType == null && this.itemTypeName != null)
{
try
{
this.itemType = Type.GetType(this.itemTypeName, true);
}
catch (Exception ex)
{
throw new ArgumentException("Failed to create ToolboxItem of type: " + this.itemTypeName, ex);
}
}
return this.itemType;
}
}
/// Gets or sets the name of the type of the current .
/// The fully qualified type name of the current toolbox item.
// Token: 0x170001AB RID: 427
// (get) Token: 0x06000675 RID: 1653 RVA: 0x00010F28 File Offset: 0x0000F128
public string ToolboxItemTypeName
{
get
{
if (this.itemTypeName == null)
{
if (this.itemType == null)
{
return string.Empty;
}
this.itemTypeName = this.itemType.AssemblyQualifiedName;
}
return this.itemTypeName;
}
}
/// The object to compare.
// Token: 0x06000676 RID: 1654 RVA: 0x00010F60 File Offset: 0x0000F160
public override bool Equals(object o)
{
ToolboxItemAttribute toolboxItemAttribute = o as ToolboxItemAttribute;
return toolboxItemAttribute != null && toolboxItemAttribute.ToolboxItemTypeName == this.ToolboxItemTypeName;
}
// Token: 0x06000677 RID: 1655 RVA: 0x00010F90 File Offset: 0x0000F190
public override int GetHashCode()
{
if (this.itemTypeName != null)
{
return this.itemTypeName.GetHashCode();
}
return base.GetHashCode();
}
/// Gets a value indicating whether the current value of the attribute is the default value for the attribute.
/// true if the current value of the attribute is the default; otherwise, false.
// Token: 0x06000678 RID: 1656 RVA: 0x00010FB0 File Offset: 0x0000F1B0
public override bool IsDefaultAttribute()
{
return this.Equals(ToolboxItemAttribute.Default);
}
// Token: 0x040001E2 RID: 482
private const string defaultItemType = "System.Drawing.Design.ToolboxItem, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
/// Initializes a new instance of the class and sets the type to the default, . This field is read-only.
// Token: 0x040001E3 RID: 483
public static readonly ToolboxItemAttribute Default = new ToolboxItemAttribute("System.Drawing.Design.ToolboxItem, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a");
/// Initializes a new instance of the class and sets the type to null. This field is read-only.
// Token: 0x040001E4 RID: 484
public static readonly ToolboxItemAttribute None = new ToolboxItemAttribute(false);
// Token: 0x040001E5 RID: 485
private Type itemType;
// Token: 0x040001E6 RID: 486
private string itemTypeName;
}
}