Udostępnij przez


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, który ma być używany do kompilowania odbiornika kanału. Dozwolone typy kanałów to IInputSessionChannel lub IInputChannel klasa.

Parametry

context
BindingContext

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

Zwraca

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 elementem IInputChannel ani IInputSessionChannel.

ExactlyOnce ma wartość true, a durable ma wartość false.

-lub-

Kolejka nie jest czytelna.

-lub-

ExactlyOnce ma wartość true, a kolejka nie jest transakcyjna.

-lub-

ExactlyOnce ma wartość false, a kolejka jest transakcyjna.

-lub-

Właściwość ReceiveErrorHandling jest ustawiona na wartość Move i nazwa kolejki zawiera znak ";" w systemie Windows Vista.

-lub-

Właściwość ExactlyOnce jest ustawiona na wartość true i nie może otworzyć ponawiania próby w kolejce podrzędnej w systemie Windows Vista.

-lub-

Właściwość ReceiveErrorHandling jest ustawiona na wartość Odrzuć lub Przenieś, a platforma to Windows Vista.

-lub-

Właściwość MsmqTransportSecurity.MsmqAuthenticationMode jest ustawiona na Wartość WindowsDomain, a usługa MSMQ jest zainstalowana 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