ConnectionConsumerAttribute コンストラクター

定義

接続ポイントの表示名に使用する値を指定し、必要に応じて接続ポイントの ID、接続ポイントの種類、またはその両方に使用する値を指定して、 ConnectionConsumerAttribute クラスの新しいインスタンスを初期化します。

オーバーロード

名前 説明
ConnectionConsumerAttribute(String)

コンシューマー接続ポイントの表示名を指定して、 ConnectionConsumerAttribute クラスの新しいインスタンスを初期化します。

ConnectionConsumerAttribute(String, String)

コンシューマー接続ポイントの表示名と ID を指定して、 ConnectionConsumerAttribute クラスの新しいインスタンスを初期化します。

ConnectionConsumerAttribute(String, Type)

コンシューマー接続ポイントに使用する表示名と特定の種類の接続ポイント オブジェクトを指定して、 ConnectionConsumerAttribute クラスの新しいインスタンスを初期化します。

ConnectionConsumerAttribute(String, String, Type)

コンシューマー接続ポイントに使用する表示名、ID、および特定の種類の接続ポイント オブジェクトを指定して、 ConnectionConsumerAttribute クラスの新しいインスタンスを初期化します。

注釈

コンシューマー コントロールには、 ConnectionConsumerAttribute メタデータ要素でマークされた複数のメソッドを含めることができます。 この場合、コンシューマーは複数の接続ポイントを持ち、 ConnectionConsumerAttribute 要素の各インスタンスは、コンシューマーの接続ポイントを区別できるように、関連付けられている接続ポイントの一意の ID 値を指定する必要があります。

ConnectionConsumerAttribute(String)

コンシューマー接続ポイントの表示名を指定して、 ConnectionConsumerAttribute クラスの新しいインスタンスを初期化します。

public:
 ConnectionConsumerAttribute(System::String ^ displayName);
public ConnectionConsumerAttribute(string displayName);
new System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute : string -> System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute
Public Sub New (displayName As String)

パラメーター

displayName
String

ユーザー インターフェイス (UI) に表示するコンシューマー接続ポイントのフレンドリ名を含む文字列。

例外

displayNamenullです。

次のコード例では、コンシューマー コントロールのコールバック メソッドでConnectionConsumerAttributeメタデータ要素を宣言する方法を示して、ConnectionConsumerAttribute クラスを使用する方法を示します。 コンストラクターの最も単純なオーバーロードが使用されることに注意してください。 displayName パラメーター値のみが指定されます。 コード例を実行するために必要な完全なコードについては、 ConnectionConsumerAttribute クラスの概要を参照してください。

[ConnectionConsumer("Row")]
public void SetConnectionInterface(IWebPartRow provider) 
{
    _provider = provider;
}
    <ConnectionConsumer("Row")> _
    Public Sub SetConnectionInterface(ByVal provider As IWebPartRow)
        _provider = provider

    End Sub
End Class

注釈

このコンストラクターは、コンシューマーとして機能する Web パーツ コントロールのメソッドで使用される属性のインスタンスを作成します。 このメソッドは、プロバイダーとコンシューマーの間の接続ポイントになります。 通常、このコンストラクターを使用する方法は、コンシューマー コントロールのコールバック メソッドとして指定するメソッドで、 ConnectionConsumerAttribute メタデータ要素を宣言することです。

displayName パラメーターは、UI でコンシューマーの接続ポイントを表すためにConnectionsZone コントロールによって使用されるコンシューマー接続ポイントのフレンドリ名です。

こちらもご覧ください

適用対象

ConnectionConsumerAttribute(String, String)

コンシューマー接続ポイントの表示名と ID を指定して、 ConnectionConsumerAttribute クラスの新しいインスタンスを初期化します。

public:
 ConnectionConsumerAttribute(System::String ^ displayName, System::String ^ id);
public ConnectionConsumerAttribute(string displayName, string id);
new System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute : string * string -> System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute
Public Sub New (displayName As String, id As String)

パラメーター

displayName
String

ユーザー インターフェイス (UI) に表示するコンシューマー接続ポイントのフレンドリ名を含む文字列。

id
String

ID。コンシューマー接続ポイントに割り当てられた一意の文字列値。

例外

displayName または idnull

注釈

displayName パラメーターは、UI でコンシューマーの接続ポイントを表すためにConnectionsZone コントロールによって使用されるコンシューマー接続ポイントのフレンドリ名です。

id パラメーターは、特定のコールバック メソッドに関連付けられているコンシューマー接続ポイントの ID を指定するために使用されます。 コントロールは複数のコネクション ポイントを持つことができますが、それぞれの id は一意である必要があります。 したがって、コンストラクターのこのオーバーロードは、コンシューマー コントロールに複数のコールバック メソッドがある場合に便利です。

こちらもご覧ください

適用対象

ConnectionConsumerAttribute(String, Type)

コンシューマー接続ポイントに使用する表示名と特定の種類の接続ポイント オブジェクトを指定して、 ConnectionConsumerAttribute クラスの新しいインスタンスを初期化します。

public:
 ConnectionConsumerAttribute(System::String ^ displayName, Type ^ connectionPointType);
public ConnectionConsumerAttribute(string displayName, Type connectionPointType);
new System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute : string * Type -> System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute
Public Sub New (displayName As String, connectionPointType As Type)

パラメーター

displayName
String

ユーザー インターフェイス (UI) に表示するコンシューマー接続ポイントのフレンドリ名を含む文字列。

connectionPointType
Type

ConsumerConnectionPointから派生し、特定のコールバック メソッドで使用する接続ポイント オブジェクトの型として指定するType

例外

displayName または connectionPointTypenull

connectionPointType が無効です。

注釈

displayName パラメーターは、UI でコンシューマーの接続ポイントを表すためにConnectionsZone コントロールによって使用されるコンシューマー接続ポイントのフレンドリ名です。

connectionPointType パラメーターは、ConsumerConnectionPointから派生したTypeである必要があります。 このパラメーターを指定すると、Web パーツ コントロール セットで提供される標準のConsumerConnectionPoint クラスではなく、Typeを使用して接続ポイントが作成されます。

こちらもご覧ください

適用対象

ConnectionConsumerAttribute(String, String, Type)

コンシューマー接続ポイントに使用する表示名、ID、および特定の種類の接続ポイント オブジェクトを指定して、 ConnectionConsumerAttribute クラスの新しいインスタンスを初期化します。

public:
 ConnectionConsumerAttribute(System::String ^ displayName, System::String ^ id, Type ^ connectionPointType);
public ConnectionConsumerAttribute(string displayName, string id, Type connectionPointType);
new System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute : string * string * Type -> System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute
Public Sub New (displayName As String, id As String, connectionPointType As Type)

パラメーター

displayName
String

ユーザー インターフェイス (UI) に表示するコンシューマー接続ポイントのフレンドリ名を含む文字列。

id
String

ID。コンシューマー接続ポイントに割り当てられた一意の文字列値。

connectionPointType
Type

ConsumerConnectionPointから派生し、特定のコールバック メソッドで使用する接続ポイント オブジェクトの型として指定するType

例外

displayNameid、または connectionPointTypenull

connectionPointType が無効です。

注釈

displayName パラメーターは、UI でコンシューマーの接続ポイントを表すためにConnectionsZone コントロールによって使用されるコンシューマー接続ポイントのフレンドリ名です。

id パラメーターは、特定のコールバック メソッドに関連付けられているコンシューマー接続ポイントの ID を指定するために使用されます。 コントロールは複数のコネクション ポイントを持つことができますが、それぞれの id は一意である必要があります。 したがって、コンストラクターのこのオーバーロードは、コンシューマー コントロールに複数のコールバック メソッドがある場合に便利です。

connectionPointType パラメーターは、ConsumerConnectionPointから派生したTypeである必要があります。 このパラメーターを指定すると、Web パーツ コントロール セットで提供される標準のConsumerConnectionPoint クラスではなく、Typeを使用して接続ポイントが作成されます。

こちらもご覧ください

適用対象