MsmqTransportBindingElement.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

Тип канала, используемый при построении прослушивателя канала. Допустимые типы каналов: класс IInputSessionChannel или IInputChannel.

Параметры

context
BindingContext

BindingContext, с помощью которого выполняется построение прослушивателя канала.

Возвращаемое значение

IChannelListener<TChannel>

Прослушиватель канала MSMQ, который можно использовать для создания каналов для получения сообщений из существующих приложений MSMQ.

Исключения

Значение контекста — null.

Значение TChannel отлично от IInputChannel и IInputSessionChannel.

ExactlyOnce имеет значение true, а Durable имеет значение false.

-или-

Очередь не доступна для чтения.

-или-

Свойство ExactlyOnce имеет значение true, и очередь является нетранзакционной.

-или-

Свойство ExactlyOnce имеет значение false, и очередь является нетранзакционной.

-или-

В Windows Vista свойству ReceiveErrorHandling присваивается значение «Move», и имя очереди содержит «;».

-или-

В Windows Vista свойству ExactlyOnce присвоено значение true, и не удается открыть вложенную очередь повторной отправки.

-или-

Свойству ReceiveErrorHandling присваивается значение «Reject» или «Move»; используется платформа Windows Vista.

-или-

Свойству MsmqTransportSecurity.MsmqAuthenticationMode назначено значение WindowsDomain, и MSMQ установлена без интеграции с ActiveDirectory.

-или-

Свойству MsmqTransportSecurity.MsmqAuthenticationMode присвоено значение None, а значение свойства MsmqTransportSecurity.MsmqProtectionLevel отлично от None.

-или-

Свойству MsmqTransportSecurity.MsmqAuthenticationMode присвоено значение Certificate или WindowsDomain, а свойство MsmqTransportSecurity.MsmqProtectionLevel имеет значение None.

Примеры

transportBindingElement.BuildChannelListener<IInputChannel>(context);

Применяется к