Share via


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 使用されるコンシューマー接続ポイントのフレンドリ名です。

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

こちらもご覧ください

適用対象

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 一意である必要があります。 したがって、コンストラクターのこのオーバーロードは、コンシューマー コントロールに複数のコールバック メソッドがある場合に便利です。

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

こちらもご覧ください

適用対象