MsmqTransportBindingElement.BuildChannelListener<TChannel> Metoda

Definicja

Tworzy odbiornik kanału przy użyciu podanego kontekstu.

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)

Parametry typu

TChannel

Typ kanału do skompilowania odbiornika kanału. Dozwolone typy kanałów to IInputSessionChannel lub IInputChannel klasa.

Parametry

context
BindingContext

Element BindingContext , za pomocą którego można skompilować odbiornik kanału.

Zwraca

IChannelListener<TChannel>

Odbiornik kanału kolejkowania komunikatów (MSMQ), który może służyć do tworzenia kanałów do odbierania komunikatów z istniejących aplikacji MSMQ.

Wyjątki

Wartość kontekstu ma wartość null.

TChannel nie jest IInputChannel ani IInputSessionChannel.

DokładnieOnce ma wartość true, a durable ma wartość false.

-lub-

Kolejka nie można odczytać.

-lub-

DokładnieOnce ma wartość true, a kolejka nie jest transakcyjna.

-lub-

DokładnieOnce ma wartość false, a kolejka jest transakcyjna.

-lub-

Funkcja ReceiveErrorHandling jest ustawiona na wartość Move (Przenoszenie), a nazwa kolejki zawiera wartość ";" w systemie Windows Vista.

-lub-

Właściwość ExactlyOnce jest ustawiona na wartość true i nie można otworzyć ponownej kolejki podrzędnej w Windows Vista.

-lub-

Funkcja ReceiveErrorHandling ma wartość Odrzuć lub Przenieś, a platforma jest Windows Vista.

-lub-

MsmqTransportSecurity.MsmqAuthenticationMode jest ustawiona na WindowsDomain, a msMQ jest instalowana bez integracji z usługą ActiveDirectory.

-lub-

MsmqTransportSecurity.MsmqAuthenticationMode to None, a MsmqTransportSecurity.MsmqProtectionLevel nie ma parametru None.

-lub-

MsmqTransportSecurity.MsmqAuthenticationMode to Certificate lub WindowsDomain, a MsmqTransportSecurity.MsmqProtectionLevel to None.

Przykłady

transportBindingElement.BuildChannelListener<IInputChannel>(context);

Dotyczy