IEndpointBehavior.ApplyClientBehavior(ServiceEndpoint, ClientRuntime) 方法

定義

實作端點上用戶端的修改或延伸。

public:
 void ApplyClientBehavior(System::ServiceModel::Description::ServiceEndpoint ^ endpoint, System::ServiceModel::Dispatcher::ClientRuntime ^ clientRuntime);
public void ApplyClientBehavior (System.ServiceModel.Description.ServiceEndpoint endpoint, System.ServiceModel.Dispatcher.ClientRuntime clientRuntime);
abstract member ApplyClientBehavior : System.ServiceModel.Description.ServiceEndpoint * System.ServiceModel.Dispatcher.ClientRuntime -> unit
Public Sub ApplyClientBehavior (endpoint As ServiceEndpoint, clientRuntime As ClientRuntime)

參數

endpoint
ServiceEndpoint

要自訂的端點。

clientRuntime
ClientRuntime

要自訂的用戶端執行階段。

備註

您可以實作 ApplyClientBehavior 方法,以在搭配端點的所有訊息上或針對特定作業檢視、修改或將自訂延伸加入至用戶端執行階段。 如需有關您可以使用用戶端執行階段物件進行何種自訂的詳細資訊,請參閱 ClientRuntimeClientOperation

如果行為只預定用於服務應用程式,建議使用 ApplyClientBehavior 方法擲回 NotImplementedException

由於其他行為可能已經加入或從執行階段移除某些作業,因此不保證描述中的作業數目和 DispatchOperation 屬性中的 Operations 物件相同。

適用於