using System;
namespace System.ComponentModel
{
/// Specifies the filter string and filter type to use for a toolbox item.
// Token: 0x020000C5 RID: 197
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)]
[Serializable]
public sealed class ToolboxItemFilterAttribute : Attribute
{
/// Initializes a new instance of the class using the specified filter string.
/// The filter string for the toolbox item.
// Token: 0x06000679 RID: 1657 RVA: 0x00010FC0 File Offset: 0x0000F1C0
public ToolboxItemFilterAttribute(string filterString)
{
this.Filter = filterString;
this.ItemFilterType = ToolboxItemFilterType.Allow;
}
/// Initializes a new instance of the class using the specified filter string and type.
/// The filter string for the toolbox item.
/// A indicating the type of the filter.
// Token: 0x0600067A RID: 1658 RVA: 0x00010FD8 File Offset: 0x0000F1D8
public ToolboxItemFilterAttribute(string filterString, ToolboxItemFilterType filterType)
{
this.Filter = filterString;
this.ItemFilterType = filterType;
}
/// Gets the filter string for the toolbox item.
/// The filter string for the toolbox item.
// Token: 0x170001AC RID: 428
// (get) Token: 0x0600067B RID: 1659 RVA: 0x00010FF0 File Offset: 0x0000F1F0
public string FilterString
{
get
{
return this.Filter;
}
}
/// Gets the type of the filter.
/// A that indicates the type of the filter.
// Token: 0x170001AD RID: 429
// (get) Token: 0x0600067C RID: 1660 RVA: 0x00010FF8 File Offset: 0x0000F1F8
public ToolboxItemFilterType FilterType
{
get
{
return this.ItemFilterType;
}
}
/// Gets the type ID for the attribute.
/// The type ID for this attribute. All objects with the same filter string return the same type ID.
// Token: 0x170001AE RID: 430
// (get) Token: 0x0600067D RID: 1661 RVA: 0x00011000 File Offset: 0x0000F200
public override object TypeId
{
get
{
return base.TypeId + this.Filter;
}
}
/// The object to compare.
// Token: 0x0600067E RID: 1662 RVA: 0x00011014 File Offset: 0x0000F214
public override bool Equals(object obj)
{
return obj is ToolboxItemFilterAttribute && (obj == this || (((ToolboxItemFilterAttribute)obj).FilterString == this.Filter && ((ToolboxItemFilterAttribute)obj).FilterType == this.ItemFilterType));
}
// Token: 0x0600067F RID: 1663 RVA: 0x00011068 File Offset: 0x0000F268
public override int GetHashCode()
{
return this.ToString().GetHashCode();
}
/// Indicates whether the specified object has a matching filter string.
/// true if the specified object has a matching filter string; otherwise, false.
/// The object to test for a matching filter string.
// Token: 0x06000680 RID: 1664 RVA: 0x00011078 File Offset: 0x0000F278
public override bool Match(object obj)
{
return obj is ToolboxItemFilterAttribute && ((ToolboxItemFilterAttribute)obj).FilterString == this.Filter;
}
// Token: 0x06000681 RID: 1665 RVA: 0x000110A0 File Offset: 0x0000F2A0
public override string ToString()
{
return string.Format("{0},{1}", this.Filter, this.ItemFilterType);
}
// Token: 0x040001E7 RID: 487
private string Filter;
// Token: 0x040001E8 RID: 488
private ToolboxItemFilterType ItemFilterType;
}
}