Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class System.​ComponentModel.​TypeDescriptionProvider

Assembly: System.ComponentModel.TypeConverter

Inheritance: object → TypeDescriptionProvider

Provides supplemental metadata to the <see cref="T:System.ComponentModel.TypeDescriptor" /> .

Properties

public bool?
RequireRegisteredTypes
Gets a value that indicates whether the provider uses reflection and requires types to be registered through <see cref="M:System.ComponentModel.TypeDescriptor.RegisterType``1" /> to support trimmed applications.

Methods

public void
RegisterType​()
Registers the type so it can be used by reflection-based providers in trimmed applications.
public object
CreateInstance​(IServiceProvider provider, Type objectType, Type[] argTypes, object[] args)
Creates an object that can substitute for another data type.
Returns The substitute <see cref="T:System.Object" /> .
provider An optional service provider.
objectType The type of object to create. This parameter is never <see langword="null" /> .
argTypes An optional array of types that represent the parameter types to be passed to the object's constructor. This array can be <see langword="null" /> or of zero length.
args An optional array of parameter values to pass to the object's constructor.
GetCache​(object instance)
Gets a per-object cache, accessed as an <see cref="T:System.Collections.IDictionary" /> of key/value pairs.
Returns An <see cref="T:System.Collections.IDictionary" /> if the provided object supports caching; otherwise, <see langword="null" /> .
instance The object for which to get the cache.
GetExtendedTypeDescriptor​(object instance)
Gets an extended custom type descriptor for the given object.
Returns An <see cref="T:System.ComponentModel.ICustomTypeDescriptor" /> that can provide extended metadata for the object.
instance The object for which to get the extended type descriptor.
GetExtendedTypeDescriptorFromRegisteredType​(object instance)
Returns an extended custom type descriptor for the given object.
Returns An <see cref="T:System.ComponentModel.ICustomTypeDescriptor" /> that can provide extended metadata for the object.
instance The object for which to get the extended type descriptor.
public string
GetFullComponentName​(object component)
Gets the name of the specified component, or <see langword="null" /> if the component has no name.
Returns The name of the specified component.
component The specified component.
public Type
GetReflectionType​(object instance)
Performs normal reflection against the given object.
Returns The type of reflection for this <paramref name="instance" /> .
instance An instance of the type (should not be <see langword="null" /> ).
public Type
GetReflectionType​(Type objectType)
Performs normal reflection against a type.
Returns The type of reflection for this <paramref name="objectType" /> .
objectType The type of object for which to retrieve the <see cref="T:System.Reflection.IReflect" /> .
public Type
GetReflectionType​(Type objectType, object instance)
Performs normal reflection against the given object with the given type.
Returns The type of reflection for this <paramref name="objectType" /> .
objectType The type of object for which to retrieve the <see cref="T:System.Reflection.IReflect" /> .
instance An instance of the type. Can be <see langword="null" /> .
public Type
GetRuntimeType​(Type reflectionType)
Converts a reflection type into a runtime type.
Returns A <see cref="T:System.Type" /> that represents the runtime equivalent of <paramref name="reflectionType" /> .
reflectionType The type to convert to its runtime equivalent.
GetTypeDescriptor​(object instance)
Gets a custom type descriptor for the given object.
Returns An <see cref="T:System.ComponentModel.ICustomTypeDescriptor" /> that can provide metadata for the type.
instance An instance of the type. Can be <see langword="null" /> if no instance was passed to the <see cref="T:System.ComponentModel.TypeDescriptor" /> .
GetTypeDescriptor​(Type objectType)
Gets a custom type descriptor for the given type.
Returns An <see cref="T:System.ComponentModel.ICustomTypeDescriptor" /> that can provide metadata for the type.
objectType The type of object for which to retrieve the type descriptor.
GetTypeDescriptor​(Type objectType, object instance)
Gets a custom type descriptor for the given type and object.
Returns An <see cref="T:System.ComponentModel.ICustomTypeDescriptor" /> that can provide metadata for the type.
objectType The type of object for which to retrieve the type descriptor.
instance An instance of the type. Can be <see langword="null" /> if no instance was passed to the <see cref="T:System.ComponentModel.TypeDescriptor" /> .
GetTypeDescriptorFromRegisteredType​(object instance)
Returns a custom type descriptor for the given type or object.
Returns An <see cref="T:System.ComponentModel.ICustomTypeDescriptor" /> that can provide metadata for the type.
instance An instance of the type. Can be <see langword="null" /> if no instance was passed to the <see cref="T:System.ComponentModel.TypeDescriptor" /> .
GetTypeDescriptorFromRegisteredType​(Type objectType)
Returns a custom type descriptor for the given type or object.
Returns An <see cref="T:System.ComponentModel.ICustomTypeDescriptor" /> that can provide metadata for the type.
objectType The type of object for which to retrieve the type descriptor.
GetTypeDescriptorFromRegisteredType​(Type objectType, object instance)
Returns a custom type descriptor for the given type or object.
Returns An <see cref="T:System.ComponentModel.ICustomTypeDescriptor" /> that can provide metadata for the type.
objectType The type of object for which to retrieve the type descriptor.
instance An instance of the type. Can be <see langword="null" /> if no instance was passed to the <see cref="T:System.ComponentModel.TypeDescriptor" /> .
public bool
IsRegisteredType​(Type type)
Determines whether the type was registered with its provider through <see cref="M:System.ComponentModel.TypeDescriptor.RegisterType``1" /> .
Returns <see langword="true" /> if <paramref name="type" /> is registered; otherwise, <see langword="false" /> .
type The type to check if it was registered.
public bool
IsSupportedType​(Type type)
Gets a value that indicates whether the specified type is compatible with the type description and its chain of type description providers.
Returns <see langword="true" /> if <paramref name="type" /> is compatible with the type description and its chain of type description providers; otherwise, <see langword="false" /> .
type The type to test for compatibility.
public bool
Equals​(object obj)
Inherited from object
protected void
Finalize​()
Inherited from object
public int
GetHashCode​()
Inherited from object
public Type
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object
public string
ToString​()
Inherited from object