ChannelFactory.InitializeEndpoint 方法
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化通道工厂的服务终结点。
InitializeEndpoint(Binding, EndpointAddress) |
使用指定的绑定和地址初始化通道工厂的服务终结点。 |
InitializeEndpoint(String, EndpointAddress) |
使用指定的地址和配置初始化通道工厂的服务终结点。 |
InitializeEndpoint(ServiceEndpoint) |
使用指定的终结点初始化通道工厂的服务终结点。 |
InitializeEndpoint(EndpointAddress) |
若要初始化终结点,必须有一个地址,但是可以只有绑定或配置,而非完整终结点。
- Source:
- ChannelFactory.cs
- Source:
- ChannelFactory.cs
- Source:
- ChannelFactory.cs
使用指定的绑定和地址初始化通道工厂的服务终结点。
protected:
void InitializeEndpoint(System::ServiceModel::Channels::Binding ^ binding, System::ServiceModel::EndpointAddress ^ address);
C#
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)
参数
- address
- EndpointAddress
用以初始化通道工厂的 EndpointAddress。
注解
如果有配置,请使用 InitializeEndpoint(String, EndpointAddress)。
适用于
.NET 8 和其他版本
产品 | 版本 |
---|---|
.NET | Core 1.0, Core 1.1, 8 |
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
UWP | 10.0 |
- Source:
- ChannelFactory.cs
- Source:
- ChannelFactory.cs
使用指定的地址和配置初始化通道工厂的服务终结点。
protected:
void InitializeEndpoint(System::String ^ configurationName, System::ServiceModel::EndpointAddress ^ address);
C#
protected void InitializeEndpoint (string configurationName, System.ServiceModel.EndpointAddress address);
member this.InitializeEndpoint : string * System.ServiceModel.EndpointAddress -> unit
Protected Sub InitializeEndpoint (configurationName As String, address As EndpointAddress)
参数
- configurationName
- String
用于初始化通道工厂的配置文件名称。
- address
- EndpointAddress
用以初始化通道工厂的 EndpointAddress。
注解
如果只有绑定,请使用 InitializeEndpoint(Binding, EndpointAddress)。
适用于
.NET Core 1.1 和其他版本
产品 | 版本 |
---|---|
.NET | Core 1.0, Core 1.1 |
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
UWP | 10.0 |
- Source:
- ChannelFactory.cs
- Source:
- ChannelFactory.cs
- Source:
- ChannelFactory.cs
使用指定的终结点初始化通道工厂的服务终结点。
protected:
void InitializeEndpoint(System::ServiceModel::Description::ServiceEndpoint ^ endpoint);
C#
protected void InitializeEndpoint (System.ServiceModel.Description.ServiceEndpoint endpoint);
member this.InitializeEndpoint : System.ServiceModel.Description.ServiceEndpoint -> unit
Protected Sub InitializeEndpoint (endpoint As ServiceEndpoint)
参数
- endpoint
- ServiceEndpoint
用以初始化通道工厂的 ServiceEndpoint。
例外
endpoint
为 null
。
注解
如果只有绑定,请使用 InitializeEndpoint(Binding, EndpointAddress)。 如果有配置,请使用 InitializeEndpoint(String, EndpointAddress)。
适用于
.NET 8 和其他版本
产品 | 版本 |
---|---|
.NET | Core 1.0, Core 1.1, 8 |
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
UWP | 10.0 |
- Source:
- ChannelFactory.cs
protected:
void InitializeEndpoint(System::ServiceModel::EndpointAddress ^ address);
C#
protected void InitializeEndpoint (System.ServiceModel.EndpointAddress address);
member this.InitializeEndpoint : System.ServiceModel.EndpointAddress -> unit
Protected Sub InitializeEndpoint (address As EndpointAddress)
参数
- address
- EndpointAddress
适用于
.NET 8
产品 | 版本 |
---|---|
.NET | 8 |