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(사용자 인터페이스)에 표시할 소비자 연결 지점의 이름을 포함하는 문자열입니다.

예외

displayName이(가) null인 경우

예제

다음 코드 예제에서는 소비자 컨트롤의 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

설명

이 생성자는 소비자 역할을 하는 웹 파트 컨트롤의 메서드와 함께 사용되는 특성의 인스턴스를 만듭니다. 이 메서드는 공급자와 소비자 간의 연결점이 됩니다. 일반적으로 이 생성자를 사용하는 방법은 소비자 컨트롤에서 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 합니다. 이 매개 변수를 지정 Type 하면 웹 파트 컨트롤 집합과 함께 제공되는 표준 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입니다.

예외

displayName, id 또는 connectionPointTypenull입니다.

connectionPointType가 잘못된 경우

설명

displayName 매개 변수는 컨트롤에서 UI에서 소비자의 연결 지점을 나타내는 데 사용되는 ConnectionsZone 소비자 연결 지점의 이름입니다.

id 매개 변수는 특정 콜백 메서드와 연결된 소비자 연결 지점의 ID를 지정하는 데 사용됩니다. 컨트롤에는 여러 연결점이 있을 수 있지만 각각에 대한 연결점은 id 고유해야 합니다. 따라서 소비자 제어에 콜백 메서드가 여러 개 있는 경우 생성자의 이 오버로드가 유용합니다.

매개 변수는 connectionPointType .에서 ConsumerConnectionPoint파생되어야 Type 합니다. 이 매개 변수를 지정 Type 하면 웹 파트 컨트롤 집합과 함께 제공되는 표준 ConsumerConnectionPoint 클래스 대신 연결점을 만드는 데 사용됩니다.

추가 정보

적용 대상