Edit

Share via


TypeDescriptionProvider.GetTypeDescriptorFromRegisteredType Method

Definition

Overloads

GetTypeDescriptorFromRegisteredType(Object)

Returns a custom type descriptor for the given type or object.

GetTypeDescriptorFromRegisteredType(Type)

Returns a custom type descriptor for the given type or object.

GetTypeDescriptorFromRegisteredType(Type, Object)

Returns a custom type descriptor for the given type or object.

GetTypeDescriptorFromRegisteredType(Object)

Returns a custom type descriptor for the given type or object.

public:
 System::ComponentModel::ICustomTypeDescriptor ^ GetTypeDescriptorFromRegisteredType(System::Object ^ instance);
public System.ComponentModel.ICustomTypeDescriptor? GetTypeDescriptorFromRegisteredType (object instance);
member this.GetTypeDescriptorFromRegisteredType : obj -> System.ComponentModel.ICustomTypeDescriptor
Public Function GetTypeDescriptorFromRegisteredType (instance As Object) As ICustomTypeDescriptor

Parameters

instance
Object

An instance of the type. Can be null if no instance was passed to the TypeDescriptor.

Returns

An ICustomTypeDescriptor that can provide metadata for the type.

Remarks

The method should return a custom type descriptor for the object. If the method is not interested in providing type information for the object it should return base.

Applies to

GetTypeDescriptorFromRegisteredType(Type)

Returns a custom type descriptor for the given type or object.

public:
 System::ComponentModel::ICustomTypeDescriptor ^ GetTypeDescriptorFromRegisteredType(Type ^ objectType);
public System.ComponentModel.ICustomTypeDescriptor? GetTypeDescriptorFromRegisteredType (Type objectType);
member this.GetTypeDescriptorFromRegisteredType : Type -> System.ComponentModel.ICustomTypeDescriptor
Public Function GetTypeDescriptorFromRegisteredType (objectType As Type) As ICustomTypeDescriptor

Parameters

objectType
Type

The type of object for which to retrieve the type descriptor.

Returns

An ICustomTypeDescriptor that can provide metadata for the type.

Remarks

The method should return a custom type descriptor for the object. If the method is not interested in providing type information for the object it should return base.

Applies to

GetTypeDescriptorFromRegisteredType(Type, Object)

Returns a custom type descriptor for the given type or object.

public:
 virtual System::ComponentModel::ICustomTypeDescriptor ^ GetTypeDescriptorFromRegisteredType(Type ^ objectType, System::Object ^ instance);
public virtual System.ComponentModel.ICustomTypeDescriptor? GetTypeDescriptorFromRegisteredType (Type objectType, object? instance);
abstract member GetTypeDescriptorFromRegisteredType : Type * obj -> System.ComponentModel.ICustomTypeDescriptor
override this.GetTypeDescriptorFromRegisteredType : Type * obj -> System.ComponentModel.ICustomTypeDescriptor
Public Overridable Function GetTypeDescriptorFromRegisteredType (objectType As Type, instance As Object) As ICustomTypeDescriptor

Parameters

objectType
Type

The type of object for which to retrieve the type descriptor.

instance
Object

An instance of the type. Can be null if no instance was passed to the TypeDescriptor.

Returns

An ICustomTypeDescriptor that can provide metadata for the type.

Remarks

The objectType parameter is always valid, but the instance parameter may be null if no instance was passed to TypeDescriptor. The method should return a custom type descriptor for the object. If the method is not interested in providing type information for the object it should return base.

This method is prototyped as virtual, and by default returns a custom type descriptor that returns empty collections for all values if no parent provider was passed. If a parent provider was passed, this method will invoke the parent provider's GetTypeDescriptorFromRegisteredType method.

Applies to