WebPartTransformerAttribute Constructor

WebPartTransformerAttribute Constructor (Type, Type)


Initializes a new instance of the WebPartTransformerAttribute class.

Namespace:   System.Web.UI.WebControls.WebParts
Assembly:  System.Web (in System.Web.dll)

public WebPartTransformerAttribute(
	Type consumerType,
	Type providerType


Type: System.Type

The Type of the interface supported by the consumer connection point.

Type: System.Type

The Type of the interface supported by the provider connection point.

Exception Condition

consumerType or providerType is not specified.


consumerType equals providerType.

The WebPartTransformerAttribute constructor sets the consumer connection point type and the provider connection point type for the transformer. These values can be retrieved through the ConsumerType property and the ProviderType property, respectively.

Legacy Code Example

The following code example demonstrates the use of a WebPartTransformerAttribute attribute with a customized WebPartTransformer class. The attribute indicates that the RowToStringTransformer class can transform a provider connection point of type IWebPartRow to a consumer connection point of type IString.

This code example is part of a larger example found in the WebPartTransformer class overview.

Code snippet is not found. Confirm that the code snippet name 'WebParts_WebPartTransformer_Overview' is correct.

.NET Framework
Available since 2.0
Return to top
© 2015 Microsoft