Share via


ChannelFactory<TChannel> Constructor

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Include Protected Members
Include Inherited Members

Include Silverlight Members
Include Silverlight for Windows Phone Members
Include XNA Framework Members

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.

Overload List

  Name Description
Public methodSupported by Silverlight for Windows Phone ChannelFactory<TChannel>(String) Initializes a new instance of the ChannelFactory<TChannel> class and configures the endpoint.
Protected method ChannelFactory<TChannel>(Type) Initializes a new instance of the ChannelFactory<TChannel> class.
Public methodSupported by Silverlight for Windows Phone ChannelFactory<TChannel>(Binding, EndpointAddress) Initializes a new instance of the ChannelFactory<TChannel> class with a specified endpoint address and binding configuration.
Public methodSupported by Silverlight for Windows Phone ChannelFactory<TChannel>(String, EndpointAddress) Initializes a new instance of the ChannelFactory<TChannel> class with a specified endpoint address and endpoint configuration.

Top

Examples

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