ChannelFactory.InitializeEndpoint 方法

定义

初始化通道工厂的服务终结点。Initializes the service endpoint of the channel factory.

重载

InitializeEndpoint(String, EndpointAddress)

使用指定的地址和配置初始化通道工厂的服务终结点。Initializes the service endpoint of the channel factory with a specified address and configuration.

InitializeEndpoint(Binding, EndpointAddress)

使用指定的绑定和地址初始化通道工厂的服务终结点。Initializes the service endpoint of the channel factory with a specified binding and address.

InitializeEndpoint(ServiceEndpoint)

使用指定的终结点初始化通道工厂的服务终结点。Initializes the service endpoint of the channel factory with a specified endpoint.

注解

若要初始化终结点,必须有一个地址,但是可以只有绑定或配置,而非完整终结点。You must have an address to initialize an endpoint, but can have just the binding or configuration instead of the full endpoint.

InitializeEndpoint(String, EndpointAddress)

使用指定的地址和配置初始化通道工厂的服务终结点。Initializes the service endpoint of the channel factory with a specified address and configuration.

protected:
 void InitializeEndpoint(System::String ^ configurationName, System::ServiceModel::EndpointAddress ^ address);
protected:
 void InitializeEndpoint(System::String ^ configurationName, System::ServiceModel::EndpointAddress ^ remoteAddress);
protected void InitializeEndpoint (string configurationName, System.ServiceModel.EndpointAddress address);
protected void InitializeEndpoint (string configurationName, System.ServiceModel.EndpointAddress remoteAddress);
member this.InitializeEndpoint : string * System.ServiceModel.EndpointAddress -> unit
member this.InitializeEndpoint : string * System.ServiceModel.EndpointAddress -> unit
Protected Sub InitializeEndpoint (configurationName As String, address As EndpointAddress)
Protected Sub InitializeEndpoint (configurationName As String, remoteAddress As EndpointAddress)

参数

configurationName
String

用于初始化通道工厂的配置文件名称。The name of the configuration file used to initialize the channel factory.

addressremoteAddress
EndpointAddress

用以初始化通道工厂的 EndpointAddressThe EndpointAddress with which to initialize the channel factory.

注解

如果只有绑定,请使用 InitializeEndpoint(Binding, EndpointAddress)Use InitializeEndpoint(Binding, EndpointAddress) if you have just the binding.

适用于

InitializeEndpoint(Binding, EndpointAddress)

使用指定的绑定和地址初始化通道工厂的服务终结点。Initializes the service endpoint of the channel factory with a specified binding and address.

protected:
 void InitializeEndpoint(System::ServiceModel::Channels::Binding ^ binding, System::ServiceModel::EndpointAddress ^ address);
protected void InitializeEndpoint (System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress address);
member this.InitializeEndpoint : System.ServiceModel.Channels.Binding * System.ServiceModel.EndpointAddress -> unit
Protected Sub InitializeEndpoint (binding As Binding, address As EndpointAddress)

参数

binding
Binding

用以初始化通道工厂的 BindingThe Binding with which to initialize the channel factory.

address
EndpointAddress

用以初始化通道工厂的 EndpointAddressThe EndpointAddress with which to initialize the channel factory.

注解

如果有配置,请使用 InitializeEndpoint(String, EndpointAddress)Use InitializeEndpoint(String, EndpointAddress) if you have the configuration.

适用于

InitializeEndpoint(ServiceEndpoint)

使用指定的终结点初始化通道工厂的服务终结点。Initializes the service endpoint of the channel factory with a specified endpoint.

protected:
 void InitializeEndpoint(System::ServiceModel::Description::ServiceEndpoint ^ endpoint);
protected void InitializeEndpoint (System.ServiceModel.Description.ServiceEndpoint endpoint);
member this.InitializeEndpoint : System.ServiceModel.Description.ServiceEndpoint -> unit
Protected Sub InitializeEndpoint (endpoint As ServiceEndpoint)

参数

endpoint
ServiceEndpoint

用以初始化通道工厂的 ServiceEndpointThe ServiceEndpoint to initialize the channel factory with.

例外

endpointnullendpoint is null.

注解

如果只有绑定,请使用 InitializeEndpoint(Binding, EndpointAddress)Use InitializeEndpoint(Binding, EndpointAddress) if you have just the binding. 如果有配置,请使用 InitializeEndpoint(String, EndpointAddress)Use InitializeEndpoint(String, EndpointAddress) if you have the configuration.

适用于