DuplexChannelFactory<TChannel>.CreateChannel 方法

定义

创建一个指定类型的双工通道,以连接到指定的终结点地址。

重载

CreateChannel(Object, Binding, EndpointAddress, Uri)

在服务和客户端上的回调实例之间创建双工通道。

CreateChannel(InstanceContext)

在服务和客户端上的回调实例之间创建双工通道。

CreateChannel(Object, String)

在服务和客户端上的回调实例之间创建双工通道。

CreateChannel(EndpointAddress, Uri)

在服务和客户端上的回调实例之间创建双工通道。

CreateChannel(InstanceContext, EndpointAddress)

在服务和客户端上的回调实例之间创建双工通道。

CreateChannel(InstanceContext, String)

在服务和客户端上的回调实例之间创建双工通道。

CreateChannel(Object, Binding, EndpointAddress)

在服务和客户端上的回调实例之间创建双工通道。

CreateChannel(InstanceContext, Binding, EndpointAddress)

在服务和客户端上的回调实例之间创建双工通道。

CreateChannel(InstanceContext, EndpointAddress, Uri)

在服务和客户端上的回调实例之间创建双工通道。

CreateChannel(InstanceContext, Binding, EndpointAddress, Uri)

在服务和客户端上的回调实例之间创建双工通道。

CreateChannel(Object, Binding, EndpointAddress, Uri)

Source:
DuplexChannelFactory.cs
Source:
DuplexChannelFactory.cs
Source:
DuplexChannelFactory.cs

在服务和客户端上的回调实例之间创建双工通道。

public:
 static TChannel CreateChannel(System::Object ^ callbackObject, System::ServiceModel::Channels::Binding ^ binding, System::ServiceModel::EndpointAddress ^ endpointAddress, Uri ^ via);
public static TChannel CreateChannel (object callbackObject, System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress endpointAddress, Uri via);
static member CreateChannel : obj * System.ServiceModel.Channels.Binding * System.ServiceModel.EndpointAddress * Uri -> 'Channel
Public Shared Function CreateChannel (callbackObject As Object, binding As Binding, endpointAddress As EndpointAddress, via As Uri) As TChannel

参数

callbackObject
Object

Object,客户端用以侦听来自所连接服务的消息。

binding
Binding

用于通过工厂生成的通道连接至服务的 Binding

endpointAddress
EndpointAddress

提供服务位置的 EndpointAddress

via
Uri

Uri,包含要将消息发送至的传输地址。

返回

TChannel

位于客户端和服务之间类型为 TChannel(工厂的泛型参数)的通道。

例外

bindingendpointAddressnull

callbackInstancecallbackInstance.UserObject 为 null

适用于

CreateChannel(InstanceContext)

Source:
DuplexChannelFactory.cs
Source:
DuplexChannelFactory.cs
Source:
DuplexChannelFactory.cs

在服务和客户端上的回调实例之间创建双工通道。

public:
 TChannel CreateChannel(System::ServiceModel::InstanceContext ^ callbackInstance);
public TChannel CreateChannel (System.ServiceModel.InstanceContext callbackInstance);
override this.CreateChannel : System.ServiceModel.InstanceContext -> 'Channel
Public Function CreateChannel (callbackInstance As InstanceContext) As TChannel

参数

callbackInstance
InstanceContext

InstanceContext,客户端用以侦听来自所连接服务的消息。

返回

TChannel

位于客户端和服务之间类型为 TChannel(工厂的泛型参数)的双工通道。

例外

callbackInstancecallbackInstance.UserObject 为 null

适用于

CreateChannel(Object, String)

Source:
DuplexChannelFactory.cs
Source:
DuplexChannelFactory.cs

在服务和客户端上的回调实例之间创建双工通道。

public:
 static TChannel CreateChannel(System::Object ^ callbackObject, System::String ^ endpointConfigurationName);
public static TChannel CreateChannel (object callbackObject, string endpointConfigurationName);
static member CreateChannel : obj * string -> 'Channel
Public Shared Function CreateChannel (callbackObject As Object, endpointConfigurationName As String) As TChannel

参数

callbackObject
Object

Object,客户端用以侦听来自所连接服务的消息。

endpointConfigurationName
String

用于终结点配置的名称。

返回

TChannel

位于客户端和服务之间类型为 TChannel(工厂的泛型参数)的通道。

例外

endpointConfigurationNamenull

callbackInstancecallbackInstance.UserObject 为 null

适用于

CreateChannel(EndpointAddress, Uri)

Source:
DuplexChannelFactory.cs
Source:
DuplexChannelFactory.cs
Source:
DuplexChannelFactory.cs

在服务和客户端上的回调实例之间创建双工通道。

public:
 override TChannel CreateChannel(System::ServiceModel::EndpointAddress ^ address, Uri ^ via);
public override TChannel CreateChannel (System.ServiceModel.EndpointAddress address, Uri via);
override this.CreateChannel : System.ServiceModel.EndpointAddress * Uri -> 'Channel
Public Overrides Function CreateChannel (address As EndpointAddress, via As Uri) As TChannel

参数

address
EndpointAddress

提供服务位置的 EndpointAddress

via
Uri

Uri,包含要将消息发送至的传输地址。

返回

TChannel

位于客户端和服务之间类型为 TChannel(工厂的泛型参数)的双工通道。

例外

addressnull

适用于

CreateChannel(InstanceContext, EndpointAddress)

Source:
DuplexChannelFactory.cs
Source:
DuplexChannelFactory.cs
Source:
DuplexChannelFactory.cs

在服务和客户端上的回调实例之间创建双工通道。

public:
 TChannel CreateChannel(System::ServiceModel::InstanceContext ^ callbackInstance, System::ServiceModel::EndpointAddress ^ address);
public TChannel CreateChannel (System.ServiceModel.InstanceContext callbackInstance, System.ServiceModel.EndpointAddress address);
override this.CreateChannel : System.ServiceModel.InstanceContext * System.ServiceModel.EndpointAddress -> 'Channel
Public Function CreateChannel (callbackInstance As InstanceContext, address As EndpointAddress) As TChannel

参数

callbackInstance
InstanceContext

InstanceContext,客户端用以侦听来自所连接服务的消息。

address
EndpointAddress

提供服务位置的 EndpointAddress

返回

TChannel

位于客户端和服务之间类型为 TChannel(工厂的泛型参数)的双工通道。

例外

addressnull

callbackInstancecallbackInstance.UserObject 为 null

适用于

CreateChannel(InstanceContext, String)

Source:
DuplexChannelFactory.cs
Source:
DuplexChannelFactory.cs

在服务和客户端上的回调实例之间创建双工通道。

public:
 static TChannel CreateChannel(System::ServiceModel::InstanceContext ^ callbackInstance, System::String ^ endpointConfigurationName);
public static TChannel CreateChannel (System.ServiceModel.InstanceContext callbackInstance, string endpointConfigurationName);
static member CreateChannel : System.ServiceModel.InstanceContext * string -> 'Channel
Public Shared Function CreateChannel (callbackInstance As InstanceContext, endpointConfigurationName As String) As TChannel

参数

callbackInstance
InstanceContext

InstanceContext,客户端用以侦听来自所连接服务的消息。

endpointConfigurationName
String

用于终结点配置的名称。

返回

TChannel

位于客户端和服务之间类型为 TChannel(工厂的泛型参数)的通道。

例外

endpointConfigurationNamenull

callbackInstancecallbackInstance.UserObject 为 null

适用于

CreateChannel(Object, Binding, EndpointAddress)

Source:
DuplexChannelFactory.cs
Source:
DuplexChannelFactory.cs
Source:
DuplexChannelFactory.cs

在服务和客户端上的回调实例之间创建双工通道。

public:
 static TChannel CreateChannel(System::Object ^ callbackObject, System::ServiceModel::Channels::Binding ^ binding, System::ServiceModel::EndpointAddress ^ endpointAddress);
public static TChannel CreateChannel (object callbackObject, System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress endpointAddress);
static member CreateChannel : obj * System.ServiceModel.Channels.Binding * System.ServiceModel.EndpointAddress -> 'Channel
Public Shared Function CreateChannel (callbackObject As Object, binding As Binding, endpointAddress As EndpointAddress) As TChannel

参数

callbackObject
Object

Object,客户端用以侦听来自所连接服务的消息。

binding
Binding

用于通过工厂生成的通道连接至服务的 Binding

endpointAddress
EndpointAddress

提供服务位置的 EndpointAddress

返回

TChannel

位于客户端和服务之间类型为 TChannel(工厂的泛型参数)的通道。

例外

bindingendpointAddressnull

callbackInstancecallbackInstance.UserObject 为 null

适用于

CreateChannel(InstanceContext, Binding, EndpointAddress)

Source:
DuplexChannelFactory.cs
Source:
DuplexChannelFactory.cs
Source:
DuplexChannelFactory.cs

在服务和客户端上的回调实例之间创建双工通道。

public:
 static TChannel CreateChannel(System::ServiceModel::InstanceContext ^ callbackInstance, System::ServiceModel::Channels::Binding ^ binding, System::ServiceModel::EndpointAddress ^ endpointAddress);
public static TChannel CreateChannel (System.ServiceModel.InstanceContext callbackInstance, System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress endpointAddress);
static member CreateChannel : System.ServiceModel.InstanceContext * System.ServiceModel.Channels.Binding * System.ServiceModel.EndpointAddress -> 'Channel
Public Shared Function CreateChannel (callbackInstance As InstanceContext, binding As Binding, endpointAddress As EndpointAddress) As TChannel

参数

callbackInstance
InstanceContext

InstanceContext,客户端用以侦听来自所连接服务的消息。

binding
Binding

用于通过工厂生成的通道连接至服务的 Binding

endpointAddress
EndpointAddress

提供服务位置的 EndpointAddress

返回

TChannel

位于客户端和服务之间类型为 TChannel(工厂的泛型参数)的通道。

例外

bindingendpointAddressnull

callbackInstancecallbackInstance.UserObject 为 null

适用于

CreateChannel(InstanceContext, EndpointAddress, Uri)

Source:
DuplexChannelFactory.cs
Source:
DuplexChannelFactory.cs
Source:
DuplexChannelFactory.cs

在服务和客户端上的回调实例之间创建双工通道。

public:
 virtual TChannel CreateChannel(System::ServiceModel::InstanceContext ^ callbackInstance, System::ServiceModel::EndpointAddress ^ address, Uri ^ via);
public virtual TChannel CreateChannel (System.ServiceModel.InstanceContext callbackInstance, System.ServiceModel.EndpointAddress address, Uri via);
override this.CreateChannel : System.ServiceModel.InstanceContext * System.ServiceModel.EndpointAddress * Uri -> 'Channel
Public Overridable Function CreateChannel (callbackInstance As InstanceContext, address As EndpointAddress, via As Uri) As TChannel

参数

callbackInstance
InstanceContext

InstanceContext,客户端用以侦听来自所连接服务的消息。

address
EndpointAddress

提供服务位置的 EndpointAddress

via
Uri

Uri,包含要将消息发送至的传输地址。

返回

TChannel

位于客户端和服务之间类型为 TChannel(工厂的泛型参数)的通道。

例外

addressnull

callbackInstancecallbackInstance.UserObject 为 null

适用于

CreateChannel(InstanceContext, Binding, EndpointAddress, Uri)

Source:
DuplexChannelFactory.cs
Source:
DuplexChannelFactory.cs
Source:
DuplexChannelFactory.cs

在服务和客户端上的回调实例之间创建双工通道。

public:
 static TChannel CreateChannel(System::ServiceModel::InstanceContext ^ callbackInstance, System::ServiceModel::Channels::Binding ^ binding, System::ServiceModel::EndpointAddress ^ endpointAddress, Uri ^ via);
public static TChannel CreateChannel (System.ServiceModel.InstanceContext callbackInstance, System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress endpointAddress, Uri via);
static member CreateChannel : System.ServiceModel.InstanceContext * System.ServiceModel.Channels.Binding * System.ServiceModel.EndpointAddress * Uri -> 'Channel
Public Shared Function CreateChannel (callbackInstance As InstanceContext, binding As Binding, endpointAddress As EndpointAddress, via As Uri) As TChannel

参数

callbackInstance
InstanceContext

InstanceContext,客户端用以侦听来自所连接服务的消息。

binding
Binding

用于通过工厂生成的通道连接至服务的 Binding

endpointAddress
EndpointAddress

提供服务位置的 EndpointAddress

via
Uri

Uri,包含要将消息发送至的传输地址。

返回

TChannel

位于客户端和服务之间类型为 TChannel(工厂的泛型参数)的通道。

例外

bindingendpointAddressnull

callbackInstancecallbackInstance.UserObject 为 null

适用于