DuplexChannelFactory<TChannel>.CreateChannel 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
建立指定類型的雙工通道,指向指定的端點位址。
多載
| 名稱 | Description |
|---|---|
| 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)
在服務與客戶端回調實例之間建立雙工通道。
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
參數
- endpointAddress
- EndpointAddress
那 EndpointAddress 就是服務地點。
傳回
一個類型的 TChannel通道,為工廠的通用參數,連接用戶端與服務。
例外狀況
binding 或 endpointAddress 為 null。
callbackInstance 或 callbackInstance。UserObject 是 null。
適用於
CreateChannel(InstanceContext)
在服務與客戶端回調實例之間建立雙工通道。
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為 的雙工通道,為工廠的通用參數,連接用戶端與服務。
例外狀況
callbackInstance 或 callbackInstance。UserObject 是 null。
適用於
CreateChannel(Object, String)
在服務與客戶端回調實例之間建立雙工通道。
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
參數
- endpointConfigurationName
- String
端點配置所用的名稱。
傳回
一個類型的 TChannel通道,為工廠的通用參數,連接用戶端與服務。
例外狀況
endpointConfigurationName 是 null。
callbackInstance 或 callbackInstance。UserObject 是 null。
適用於
CreateChannel(EndpointAddress, Uri)
在服務與客戶端回調實例之間建立雙工通道。
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 就是服務地點。
傳回
一個類型 TChannel為 的雙工通道,為工廠的通用參數,連接用戶端與服務。
例外狀況
address 是 null。
適用於
CreateChannel(InstanceContext, EndpointAddress)
在服務與客戶端回調實例之間建立雙工通道。
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為 的雙工通道,為工廠的通用參數,連接用戶端與服務。
例外狀況
address 是 null。
callbackInstance 或 callbackInstance。UserObject 是 null。
適用於
CreateChannel(InstanceContext, String)
在服務與客戶端回調實例之間建立雙工通道。
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通道,為工廠的通用參數,連接用戶端與服務。
例外狀況
endpointConfigurationName 是 null。
callbackInstance 或 callbackInstance。UserObject 是 null。
適用於
CreateChannel(Object, Binding, EndpointAddress)
在服務與客戶端回調實例之間建立雙工通道。
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
參數
- endpointAddress
- EndpointAddress
那 EndpointAddress 就是服務地點。
傳回
一個類型的 TChannel通道,為工廠的通用參數,連接用戶端與服務。
例外狀況
binding 或 endpointAddress 為 null。
callbackInstance 或 callbackInstance。UserObject 是 null。
適用於
CreateChannel(InstanceContext, Binding, EndpointAddress)
在服務與客戶端回調實例之間建立雙工通道。
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 用來監聽連接服務的訊息。
- endpointAddress
- EndpointAddress
那 EndpointAddress 就是服務地點。
傳回
一個類型的 TChannel通道,為工廠的通用參數,連接用戶端與服務。
例外狀況
binding 或 endpointAddress 為 null。
callbackInstance 或 callbackInstance。UserObject 是 null。
適用於
CreateChannel(InstanceContext, EndpointAddress, Uri)
在服務與客戶端回調實例之間建立雙工通道。
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 就是服務地點。
傳回
一個類型的 TChannel通道,為工廠的通用參數,連接用戶端與服務。
例外狀況
address 是 null。
callbackInstance 或 callbackInstance。UserObject 是 null。
適用於
CreateChannel(InstanceContext, Binding, EndpointAddress, Uri)
在服務與客戶端回調實例之間建立雙工通道。
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 用來監聽連接服務的訊息。
- endpointAddress
- EndpointAddress
那 EndpointAddress 就是服務地點。
傳回
一個類型的 TChannel通道,為工廠的通用參數,連接用戶端與服務。
例外狀況
binding 或 endpointAddress 為 null。
callbackInstance 或 callbackInstance。UserObject 是 null。