Table of Contents

Class DynamicTypeDescriptionProvider

Namespace
Bonsai.Design
Assembly
Bonsai.Design.dll

Provides dynamic supplemental metadata to a TypeDescriptor.

public class DynamicTypeDescriptionProvider : TypeDescriptionProvider
Inheritance
DynamicTypeDescriptionProvider
Inherited Members

Properties

Properties

Gets the collection of dynamic custom properties to be added to the TypeDescriptor.

public Collection<PropertyDescriptor> Properties { get; }

Property Value

Collection<PropertyDescriptor>

Methods

GetExtendedTypeDescriptor(object)

Gets an extended custom type descriptor for the given object.

public override ICustomTypeDescriptor GetExtendedTypeDescriptor(object instance)

Parameters

instance object

The object for which to get the extended type descriptor.

Returns

ICustomTypeDescriptor

An ICustomTypeDescriptor that can provide extended metadata for the object.

GetTypeDescriptor(Type, object)

Gets a custom type descriptor for the given type and object.

public override ICustomTypeDescriptor GetTypeDescriptor(Type objectType, object instance)

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

ICustomTypeDescriptor

An ICustomTypeDescriptor that can provide metadata for the type.