TypeDescriptor.AddProviderTransparent Method

Definition

Adds a type description provider to the list of providers for this type descriptor.

Overloads

AddProviderTransparent(TypeDescriptionProvider, Object)

Adds a type description provider for a single instance of a component.

AddProviderTransparent(TypeDescriptionProvider, Type)

Adds a type description provider for a component class.

AddProviderTransparent(TypeDescriptionProvider, Object)

Adds a type description provider for a single instance of a component.

public:
 static void AddProviderTransparent(System::ComponentModel::TypeDescriptionProvider ^ provider, System::Object ^ instance);
public static void AddProviderTransparent (System.ComponentModel.TypeDescriptionProvider provider, object instance);
static member AddProviderTransparent : System.ComponentModel.TypeDescriptionProvider * obj -> unit
Public Shared Sub AddProviderTransparent (provider As TypeDescriptionProvider, instance As Object)

Parameters

instance
Object

An instance of the target component.

Exceptions

One or both of the parameters are null.

Remarks

This method can be called from partially trusted code. If RestrictedRegistrationAccess is defined, the caller can register a provider for the specified instance if its type is also partially trusted.

Use the AddProvider(TypeDescriptionProvider, Object) method if you do not need to call from partially trusted code.

Applies to

AddProviderTransparent(TypeDescriptionProvider, Type)

Adds a type description provider for a component class.

public:
 static void AddProviderTransparent(System::ComponentModel::TypeDescriptionProvider ^ provider, Type ^ type);
public static void AddProviderTransparent (System.ComponentModel.TypeDescriptionProvider provider, Type type);
static member AddProviderTransparent : System.ComponentModel.TypeDescriptionProvider * Type -> unit
Public Shared Sub AddProviderTransparent (provider As TypeDescriptionProvider, type As Type)

Parameters

type
Type

The Type of the target component.

Exceptions

One or both of the parameters are null.

Remarks

This method can be called from partially trusted code. If RestrictedRegistrationAccess is defined, the caller can register a provider for the specified type if it is also partially trusted.

Use the AddProvider(TypeDescriptionProvider, Type) method if you do not need to call from partially trusted code.

Applies to