ChannelFactory(TChannel) Constructor

ChannelFactory<TChannel> Constructor

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Initializes a new instance of the ChannelFactory<TChannel> class.

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

  NameDescription
Public method ChannelFactory<TChannel>(String) Initializes a new instance of the ChannelFactory<TChannel> class and configures the endpoint.
Public method ChannelFactory<TChannel>(Binding, EndpointAddress) Initializes a new instance of the ChannelFactory<TChannel> class with a specified endpoint address and binding configuration.
Public method ChannelFactory<TChannel>(String, EndpointAddress) Initializes a new instance of the ChannelFactory<TChannel> class with a specified endpoint address and endpoint configuration.
Top


//Initialize channel factory with a binding and a remote endpoint address.
BasicHttpBinding binding = new BasicHttpBinding();
EndpointAddress address = new EndpointAddress("http://localhost:8000/ChannelApp");
ChannelFactory<IRequestChannel> factory =
    new ChannelFactory<IRequestChannel>(binding, address);


Show:
© 2017 Microsoft