Udostępnij za pośrednictwem


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

Parametry

context
BindingContext

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

Zwraca

IChannelListener<TChannel>

Odbiornik kanału integracji 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 to null.

Nie jest to TChannel IInputChannel.

DokładnieOnce jest true i durable to false.

-lub-

Kolejka nie jest czytelna.

-lub-

DokładnieOnce jest true i kolejka nie jest transakcyjna.

-lub-

DokładnieOnce jest false i 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 true i nie można otworzyć ponawiania próby w kolejce podrzędnej w Windows Vista.

-lub-

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

-lub-

MsmqAuthenticationMode jest ustawiona na Wartość WindowsDomain i jeśli środowisko MSMQ jest zainstalowane bez integracji z usługą Active Directory.

-lub-

MsmqAuthenticationMode to None i MsmqProtectionLevel nie ma żadnego.

-lub-

MsmqAuthenticationMode to Certificate lub WindowsDomain i MsmqProtectionLevel ma wartość None.

Uwagi

Odbiorniki kanału są tworzone w usłudze i są używane do odbierania komunikatów wysyłanych przez kanał klienta. Usługa musi wywołać metodę IChannelListener.Open , a następnie IChannelListener.AcceptChannel uzyskać odwołanie do rzeczywistego kanału. Następnie IChannel.Open należy wywołać polecenie , aby otworzyć kanał. W tym momencie kanał może służyć do pobierania komunikatów.

Dotyczy