using System; using System.Collections; namespace System.ComponentModel { /// Provides supplemental metadata to the . // Token: 0x020000CB RID: 203 public abstract class TypeDescriptionProvider { /// Initializes a new instance of the class. // Token: 0x060006C2 RID: 1730 RVA: 0x00011580 File Offset: 0x0000F780 protected TypeDescriptionProvider() { } /// Initializes a new instance of the class using a parent type description provider. /// The parent type description provider. // Token: 0x060006C3 RID: 1731 RVA: 0x00011588 File Offset: 0x0000F788 protected TypeDescriptionProvider(TypeDescriptionProvider parent) { this._parent = parent; } /// Creates an object that can substitute for another data type. /// The substitute . /// An optional service provider. /// The type of object to create. This parameter is never null. /// An optional array of types that represent the parameter types to be passed to the object's constructor. This array can be null or of zero length. /// An optional array of parameter values to pass to the object's constructor. // Token: 0x060006C4 RID: 1732 RVA: 0x00011598 File Offset: 0x0000F798 public virtual object CreateInstance(IServiceProvider provider, Type objectType, Type[] argTypes, object[] args) { if (this._parent != null) { return this._parent.CreateInstance(provider, objectType, argTypes, args); } return Activator.CreateInstance(objectType, args); } /// Gets a per-object cache, accessed as an of key/value pairs. /// An if the provided object supports caching; otherwise, null. /// The object for which to get the cache. // Token: 0x060006C5 RID: 1733 RVA: 0x000115CC File Offset: 0x0000F7CC public virtual IDictionary GetCache(object instance) { if (this._parent != null) { return this._parent.GetCache(instance); } return null; } /// Gets an extended custom type descriptor for the given object. /// An that can provide extended metadata for the object. /// The object for which to get the extended type descriptor. // Token: 0x060006C6 RID: 1734 RVA: 0x000115E8 File Offset: 0x0000F7E8 public virtual ICustomTypeDescriptor GetExtendedTypeDescriptor(object instance) { if (this._parent != null) { return this._parent.GetExtendedTypeDescriptor(instance); } if (this._emptyCustomTypeDescriptor == null) { this._emptyCustomTypeDescriptor = new TypeDescriptionProvider.EmptyCustomTypeDescriptor(); } return this._emptyCustomTypeDescriptor; } /// Gets the name of the specified component, or null if the component has no name. /// The name of the specified component. /// The specified component. /// /// is null. // Token: 0x060006C7 RID: 1735 RVA: 0x0001162C File Offset: 0x0000F82C public virtual string GetFullComponentName(object component) { if (this._parent != null) { return this._parent.GetFullComponentName(component); } return this.GetTypeDescriptor(component).GetComponentName(); } /// Performs normal reflection against the given object. /// A . /// An instance of the type (should not be null). /// /// is null. // Token: 0x060006C8 RID: 1736 RVA: 0x00011660 File Offset: 0x0000F860 public Type GetReflectionType(object instance) { if (instance == null) { throw new ArgumentNullException("instance"); } return this.GetReflectionType(instance.GetType(), instance); } /// Performs normal reflection against a type. /// A . /// The type of object for which to retrieve the . /// /// is null. // Token: 0x060006C9 RID: 1737 RVA: 0x00011680 File Offset: 0x0000F880 public Type GetReflectionType(Type objectType) { return this.GetReflectionType(objectType, null); } /// Performs normal reflection against the given object with the given type. /// A . /// The type of object for which to retrieve the . /// An instance of the type. Can be null. // Token: 0x060006CA RID: 1738 RVA: 0x0001168C File Offset: 0x0000F88C public virtual Type GetReflectionType(Type objectType, object instance) { if (this._parent != null) { return this._parent.GetReflectionType(objectType, instance); } return objectType; } /// Gets a custom type descriptor for the given object. /// An that can provide metadata for the type. /// An instance of the type. Can be null if no instance was passed to the . /// /// is null. // Token: 0x060006CB RID: 1739 RVA: 0x000116A8 File Offset: 0x0000F8A8 public ICustomTypeDescriptor GetTypeDescriptor(object instance) { if (instance == null) { throw new ArgumentNullException("instance"); } return this.GetTypeDescriptor(instance.GetType(), instance); } /// Gets a custom type descriptor for the given type. /// An that can provide metadata for the type. /// The type of object for which to retrieve the type descriptor. // Token: 0x060006CC RID: 1740 RVA: 0x000116C8 File Offset: 0x0000F8C8 public ICustomTypeDescriptor GetTypeDescriptor(Type objectType) { return this.GetTypeDescriptor(objectType, null); } /// Gets a custom type descriptor for the given type and object. /// An that can provide metadata for the type. /// The type of object for which to retrieve the type descriptor. /// An instance of the type. Can be null if no instance was passed to the . // Token: 0x060006CD RID: 1741 RVA: 0x000116D4 File Offset: 0x0000F8D4 public virtual ICustomTypeDescriptor GetTypeDescriptor(Type objectType, object instance) { if (this._parent != null) { return this._parent.GetTypeDescriptor(objectType, instance); } if (this._emptyCustomTypeDescriptor == null) { this._emptyCustomTypeDescriptor = new TypeDescriptionProvider.EmptyCustomTypeDescriptor(); } return this._emptyCustomTypeDescriptor; } // Token: 0x040001F3 RID: 499 private TypeDescriptionProvider.EmptyCustomTypeDescriptor _emptyCustomTypeDescriptor; // Token: 0x040001F4 RID: 500 private TypeDescriptionProvider _parent; // Token: 0x020000CC RID: 204 private sealed class EmptyCustomTypeDescriptor : CustomTypeDescriptor { } } }