Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ReliableSessionBindingElement::CanBuildChannelListener<TChannel> Method (BindingContext^)

 

Returns a value that indicates whether the channel listener can be built for the channel and context provided that can support a reliable session.

Namespace:   System.ServiceModel.Channels
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public:
generic<typename TChannel>
where TChannel : ref class, IChannel
virtual bool CanBuildChannelListener(
	BindingContext^ context
) override

Parameters

context
Type: System.ServiceModel.Channels::BindingContext^

The BindingContext that contains the information required to build the listeners that can accept channels of type TChannel.

Return Value

Type: System::Boolean

true if the ChannelListenerBase<TChannel> that can produce an IChannel of type TChannel can be built by the binding element; otherwise, false.

Type Parameters

TChannel

The IChannel that the channel listener, if build, accepts.

Channel stacks are typically created using a factory pattern where a binding creates the channel stack. When sending messages, a binding is used to build a channel factory which in turn builds a channel stack and returns a reference to the top channel in the stack. The application can then use this channel to send messages. Similarly when receiving messages, a binding is used to build a channel listener which listens for incoming messages. The channel listener provides messages to the listening application by creating channel stacks and handing the application a reference to the top channel.

This method returns true or false for a TChannel in accordance with the table of values provided in BuildChannelListener<TChannel>(BindingContext^).

.NET Framework
Available since 3.0
Return to top
Show:
© 2017 Microsoft