This documentation is archived and is not being maintained.

WebPartTransformerAttribute Constructor

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
)

Parameters

consumerType
Type: System::Type

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

providerType
Type: System::Type

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

ExceptionCondition
ArgumentNullException

consumerType or providerType is not specified.

InvalidOperationException

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.

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.

No code example is currently available or this language may not be supported.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0
Show: