Table of Contents

Interface ICustomTypeDescriptorProvider

Namespace
Ecng.ComponentModel
Assembly
Ecng.ComponentModel.dll

Provides a mechanism to retrieve a custom type descriptor for a given type and instance.

public interface ICustomTypeDescriptorProvider
Extension Methods

Methods

TryGet(Type, object, out ICustomTypeDescriptor)

Attempts to retrieve the custom type descriptor associated with the specified type and instance.

bool TryGet(Type type, object instance, out ICustomTypeDescriptor descriptor)

Parameters

type Type

The type for which the custom type descriptor is requested.

instance object

The instance associated with the specified type.

descriptor ICustomTypeDescriptor

When this method returns, contains the custom type descriptor if found; otherwise, null.

Returns

bool

True if the custom type descriptor was successfully retrieved; otherwise, false.