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.
| Name | Description | |
|---|---|---|
|
ChannelFactory<TChannel>(String) | Initializes a new instance of the ChannelFactory<TChannel> class and configures the endpoint. |
|
ChannelFactory<TChannel>(Binding, EndpointAddress) | Initializes a new instance of the ChannelFactory<TChannel> class with a specified endpoint address and binding configuration. |
|
ChannelFactory<TChannel>(String, EndpointAddress) | Initializes a new instance of the ChannelFactory<TChannel> class with a specified endpoint address and endpoint configuration. |
//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: