ClientOperation 클래스

정의

클라이언트 개체 또는 클라이언트 채널 개체에서 특정 계약 작업의 실행 동작을 수정하거나 확장하는 데 사용됩니다. 이 클래스는 상속될 수 없습니다.

public ref class ClientOperation sealed
public ref class ClientOperation sealed : System::ServiceModel::Dispatcher::ClientOperationCompatBase
public sealed class ClientOperation
public sealed class ClientOperation : System.ServiceModel.Dispatcher.ClientOperationCompatBase
type ClientOperation = class
type ClientOperation = class
    inherit ClientOperationCompatBase
Public NotInheritable Class ClientOperation
Public NotInheritable Class ClientOperation
Inherits ClientOperationCompatBase
상속
ClientOperation
상속

예제

다음 코드 예제에서는 속성의 System.ServiceModel.Description.IEndpointBehavior 각각 ClientOperation 에 사용자 지정 매개 변수 검사기를 삽입하는 방법을 보여 있습니다 ClientRuntime.Operations .

#region IEndpointBehavior Members
public void AddBindingParameters(
  ServiceEndpoint endpoint, BindingParameterCollection bindingParameters
) { return; }

public void ApplyClientBehavior(ServiceEndpoint endpoint, ClientRuntime clientRuntime)
{
  clientRuntime.MessageInspectors.Add(new Inspector());
  foreach (ClientOperation op in clientRuntime.Operations)
    op.ParameterInspectors.Add(new Inspector());
}

public void ApplyDispatchBehavior(ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher)
{
  endpointDispatcher.DispatchRuntime.MessageInspectors.Add(new Inspector());
  foreach (DispatchOperation op in endpointDispatcher.DispatchRuntime.Operations)
    op.ParameterInspectors.Add(new Inspector());
}

public void Validate(ServiceEndpoint endpoint){ return; }
#Region "IEndpointBehavior Members"
    Public Sub AddBindingParameters(ByVal endpoint As ServiceEndpoint, ByVal bindingParameters _
                                    As BindingParameterCollection) Implements IEndpointBehavior.AddBindingParameters
        Return
    End Sub

    Public Sub ApplyClientBehavior(ByVal endpoint As ServiceEndpoint, ByVal clientRuntime As ClientRuntime) _
    Implements IEndpointBehavior.ApplyClientBehavior
        clientRuntime.MessageInspectors.Add(New Inspector())
        For Each op As ClientOperation In clientRuntime.Operations
            op.ParameterInspectors.Add(New Inspector())
        Next op
    End Sub

    Public Sub ApplyDispatchBehavior(ByVal endpoint As ServiceEndpoint, ByVal endpointDispatcher As  _
                                     EndpointDispatcher) Implements IEndpointBehavior.ApplyDispatchBehavior
        endpointDispatcher.DispatchRuntime.MessageInspectors.Add(New Inspector())
        For Each op As DispatchOperation In endpointDispatcher.DispatchRuntime.Operations
            op.ParameterInspectors.Add(New Inspector())
        Next op
    End Sub

Public Sub Validate(ByVal endpoint As ServiceEndpoint) Implements IEndpointBehavior.Validate
    Return
End Sub

설명

클래스는 ClientOperation 하나의 서비스 작업으로만 범위가 지정된 사용자 지정 확장에 대한 클라이언트 런타임 수정 및 삽입 지점의 위치입니다. (계약의 모든 메시지에 대한 클라이언트 런타임 동작을 수정하려면 클래스를 ClientRuntime 사용합니다. )

사용자 지정 클라이언트 동작 개체(수정할 특정 작업을 찾기 위해) 또는 형식 IContractBehavior IOperationBehavior (사용자 지정 특성을 만들어 적용할 수 있음)을 사용하여 수정을 설치 ClientOperation 합니다.

특정 서비스 작업을 나타내는 Operations 개체를 찾으려면 ClientOperation 속성을 사용합니다.

클라이언트 및 클라이언트 아키텍처에 대한 자세한 내용은 WCF 클라이언트 및 WCF 클라이언트 아키텍처를 사용하여 서비스에 액세스하는 것을 참조 하세요. 클라이언트 런타임 사용자 지정에 대한 자세한 내용은 클라이언트 확장을 참조하세요. 동작 사용에 대한 자세한 내용은 동작을 사용하여 런타임 구성 및 확장을 참조하세요.

다음 속성을 사용하면 사용자 지정 개체를 삽입하거나 클라이언트 실행 동작을 수정할 수 있습니다.

  • 작업에 대한 사용자 지정 Formatter 구현을 삽입하거나 현재 포맷터를 수정하려면 IClientMessageFormatter 속성을 사용합니다.

  • 사용자 지정 ParameterInspectors 구현을 삽입하거나 현재 구현을 수정하려면 IParameterInspector 속성을 사용합니다.

  • 아웃 SerializeRequest 바운드 메시지를 serialize하는 사용자를 제어하려면 이 속성을 사용합니다.

  • DeserializeReply 바운드 메시지를 역직렬화하는 사용자를 제어하려면 이 속성을 사용합니다.

  • Action 속성을 사용하여 요청 메시지의 WS-Addressing 동작에 액세스하고 속성에 ReplyAction 액세스하여 응답 메시지 작업에 액세스합니다.

  • BeginMethod EndMethod 비동기 작업과 연결된 클라이언트 메서드를 지정합니다.

  • SOAP 오류에 FaultContractInfos 세부 정보 형식으로 표시할 수 있는 지정된 형식의 컬렉션을 가져올 수 있습니다.

  • IsInitiatingIsTerminating 속성을 사용하여 작업이 호출될 때 세션이 시작되는지 아니면 철거되는지를 각각 제어합니다.

  • 호출을 IsOneWay 완료하기 전에 클라이언트가 응답을 기다리는지 여부를 제어하려면 이 속성을 사용합니다.

  • Parent 포함하는 ClientRuntime 개체를 가져오려면 이 속성을 사용합니다.

  • Name 속성을 사용하여 작업의 이름을 가져옵니다.

  • SyncMethod 속성을 사용하여 작업에 매핑되는 메서드를 제어합니다.

생성자

ClientOperation(ClientRuntime, String, String)

지정된 ClientOperation, 이름 및 동작 값을 사용하여 ClientRuntime 클래스의 새 인스턴스를 초기화합니다.

ClientOperation(ClientRuntime, String, String, String)

지정된 ClientOperation, 이름, 동작 및 회신 동작 값을 사용하여 ClientRuntime 클래스의 새 인스턴스를 초기화합니다.

속성

Action

작업의 동작을 가져옵니다.

BeginMethod

비동기 작업과 연결된 메서드를 가져오거나 설정합니다.

ClientParameterInspectors

클라이언트 호출 이전 또는 이후의 매개 변수를 보거나 수정하는 데 사용되는 매개 변수 검사자 개체의 컬렉션을 가져옵니다.

DeserializeReply

회신 메시지를 역직렬화하는 데 Formatter 속성 값이 사용되는지 여부를 나타내는 값을 가져오거나 설정합니다.

EndMethod

작업에 대한 비동기 End 메서드를 구현하는 메서드를 가져오거나 설정합니다.

FaultContractInfos

이 작업에 대해 지정된 SOAP 오류를 나타내는 FaultContractInfo 개체 컬렉션을 가져옵니다.

Formatter

개체를 메시지로 직렬화하고 메시지를 개체로 역직렬화하는 포맷터를 가져오거나 설정합니다.

IsInitiating

이 작업에 대한 메시지에서 세션을 시작할 수 있는지 여부를 나타내는 값을 가져오거나 설정합니다.

IsOneWay

작업이 단방향 작업인지를 나타내는 값을 가져오거나 설정합니다.

IsTerminating

이 작업이 세션의 마지막 작업인지 여부를 나타내는 값을 가져오거나 설정합니다.

Name

작업의 이름을 가져옵니다.

ParameterInspectors

특정 클라이언트 메서드에 대한 인바운드 및 아웃바운드 개체를 검사 및 수정할 수 있는 IParameterInspector 개체 컬렉션을 가져오거나 설정합니다.

Parent

포함하는 ClientRuntime 개체를 가져옵니다.

ReplyAction

이 작업에 대한 회신 메시지 동작을 가져옵니다.

SerializeRequest

Formatter 개체가 아웃바운드 메시지를 serialize하는지 여부를 지정하는 값을 가져오거나 설정합니다.

SyncMethod

이 작업과 연결된 메서드를 가져오거나 설정합니다.

TaskMethod

작업과 관련된 메서드를 가져오거나 설정합니다.

TaskTResult

작업과 연결되는 메서드 결과의 형식을 가져오거나 설정합니다.

메서드

Equals(Object)

지정된 개체가 현재 개체와 같은지 확인합니다.

(다음에서 상속됨 Object)
GetHashCode()

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetType()

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

적용 대상