Export (0) Print
Expand All

ChannelFactory<TChannel>.CreateChannel Method

Creates a channel of a specified type to communicate with a specified endpoint address.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  Name Description
Public method CreateChannel() Creates a channel that is used to send messages to a service.
Public method Supported by Silverlight for Windows Phone CreateChannel(EndpointAddress) Creates a channel that is used to send messages to a service at a specific endpoint address.
Public method Supported by Silverlight for Windows Phone CreateChannel(EndpointAddress, Uri) Creates a channel that is used to send messages to a service at a specific endpoint address through a specified transport address.
Top

Creates a channel of type TChannel, the generic parameter for the class.


            //Create a request channel specifying a remote endpoint address and a transport address.
            EndpointAddress address4 = new EndpointAddress("http://localhost:8000/ChannelApp");
            Uri via4 = new Uri("http://localhost:8000/Via");
            ChannelFactory<IRequestChannel> factory4 = new ChannelFactory<IRequestChannel>("MyEndpointConfig");
            IRequestChannel channel4 = factory4.CreateChannel(address4, via4);



Community Additions

ADD
Show:
© 2014 Microsoft