72 lines
3.6 KiB
C#
72 lines
3.6 KiB
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace System.ComponentModel
|
|
{
|
|
/// <summary>Specifies what type to use as a converter for the object this attribute is bound to. This class cannot be inherited.</summary>
|
|
// Token: 0x020000CA RID: 202
|
|
[ComVisible(true)]
|
|
[AttributeUsage(AttributeTargets.All)]
|
|
public sealed class TypeConverterAttribute : Attribute
|
|
{
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.TypeConverterAttribute" /> class with the default type converter, which is an empty string ("").</summary>
|
|
// Token: 0x060006BB RID: 1723 RVA: 0x000114FC File Offset: 0x0000F6FC
|
|
public TypeConverterAttribute()
|
|
{
|
|
this.converter_type = string.Empty;
|
|
}
|
|
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.TypeConverterAttribute" /> class, using the specified type name as the data converter for the object this attribute is bound to.</summary>
|
|
/// <param name="typeName">The fully qualified name of the class to use for data conversion for the object this attribute is bound to. </param>
|
|
// Token: 0x060006BC RID: 1724 RVA: 0x00011510 File Offset: 0x0000F710
|
|
public TypeConverterAttribute(string typeName)
|
|
{
|
|
this.converter_type = typeName;
|
|
}
|
|
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.TypeConverterAttribute" /> class, using the specified type as the data converter for the object this attribute is bound to.</summary>
|
|
/// <param name="type">A <see cref="T:System.Type" /> that represents the type of the converter class to use for data conversion for the object this attribute is bound to. </param>
|
|
// Token: 0x060006BD RID: 1725 RVA: 0x00011520 File Offset: 0x0000F720
|
|
public TypeConverterAttribute(Type type)
|
|
{
|
|
this.converter_type = type.AssemblyQualifiedName;
|
|
}
|
|
|
|
/// <summary>Returns whether the value of the given object is equal to the current <see cref="T:System.ComponentModel.TypeConverterAttribute" />.</summary>
|
|
/// <returns>true if the value of the given object is equal to that of the current; otherwise, false.</returns>
|
|
/// <param name="obj">The object to test the value equality of. </param>
|
|
// Token: 0x060006BF RID: 1727 RVA: 0x00011540 File Offset: 0x0000F740
|
|
public override bool Equals(object obj)
|
|
{
|
|
return obj is TypeConverterAttribute && ((TypeConverterAttribute)obj).ConverterTypeName == this.converter_type;
|
|
}
|
|
|
|
/// <summary>Returns the hash code for this instance.</summary>
|
|
/// <returns>A hash code for the current <see cref="T:System.ComponentModel.TypeConverterAttribute" />.</returns>
|
|
// Token: 0x060006C0 RID: 1728 RVA: 0x00011568 File Offset: 0x0000F768
|
|
public override int GetHashCode()
|
|
{
|
|
return this.converter_type.GetHashCode();
|
|
}
|
|
|
|
/// <summary>Gets the fully qualified type name of the <see cref="T:System.Type" /> to use as a converter for the object this attribute is bound to.</summary>
|
|
/// <returns>The fully qualified type name of the <see cref="T:System.Type" /> to use as a converter for the object this attribute is bound to, or an empty string ("") if none exists. The default value is an empty string ("").</returns>
|
|
// Token: 0x170001B7 RID: 439
|
|
// (get) Token: 0x060006C1 RID: 1729 RVA: 0x00011578 File Offset: 0x0000F778
|
|
public string ConverterTypeName
|
|
{
|
|
get
|
|
{
|
|
return this.converter_type;
|
|
}
|
|
}
|
|
|
|
/// <summary>Specifies the type to use as a converter for the object this attribute is bound to. This static field is read-only.</summary>
|
|
// Token: 0x040001F1 RID: 497
|
|
public static readonly TypeConverterAttribute Default = new TypeConverterAttribute();
|
|
|
|
// Token: 0x040001F2 RID: 498
|
|
private string converter_type;
|
|
}
|
|
}
|