BinaryMessageEncodingBindingElement.BuildChannelListener<TChannel> 메서드

정의

지정된 컨텍스트에 대해 지정된 유형의 채널을 허용하는 채널 수신기를 서비스에 생성합니다.

public:
generic <typename TChannel>
 where TChannel : class, System::ServiceModel::Channels::IChannel override System::ServiceModel::Channels::IChannelListener<TChannel> ^ BuildChannelListener(System::ServiceModel::Channels::BindingContext ^ context);
public override System.ServiceModel.Channels.IChannelListener<TChannel> BuildChannelListener<TChannel> (System.ServiceModel.Channels.BindingContext context) where TChannel : class, System.ServiceModel.Channels.IChannel;
override this.BuildChannelListener : System.ServiceModel.Channels.BindingContext -> System.ServiceModel.Channels.IChannelListener<'Channel (requires 'Channel : null and 'Channel :> System.ServiceModel.Channels.IChannel)> (requires 'Channel : null and 'Channel :> System.ServiceModel.Channels.IChannel)
Public Overrides Function BuildChannelListener(Of TChannel As {Class, IChannel}) (context As BindingContext) As IChannelListener(Of TChannel)

형식 매개 변수

TChannel

채널 수신기가 수락하는 채널 형식입니다.

매개 변수

context
BindingContext

수신기의 BindingContext입니다.

반환

지정된 컨텍스트에 대한 IChannelListener<TChannel> 형식의 TChannel입니다.

예제

var binding2 = new CustomBinding();
var bpCol2 = new BindingParameterCollection();
var context2 = new BindingContext(binding2, bpCol2);
be.BuildChannelListener<IDuplexChannel>(context2);
Dim binding2 As New CustomBinding()
Dim bpCol2 As New BindingParameterCollection()
Dim context2 As New BindingContext(binding2, bpCol2)
be.BuildChannelListener(Of IDuplexChannel)(context2)

적용 대상