다음을 통해 공유


ClientOperation.ParameterInspectors 속성

정의

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

public:
 property System::Collections::Generic::SynchronizedCollection<System::ServiceModel::Dispatcher::IParameterInspector ^> ^ ParameterInspectors { System::Collections::Generic::SynchronizedCollection<System::ServiceModel::Dispatcher::IParameterInspector ^> ^ get(); };
public System.Collections.Generic.SynchronizedCollection<System.ServiceModel.Dispatcher.IParameterInspector> ParameterInspectors { get; }
member this.ParameterInspectors : System.Collections.Generic.SynchronizedCollection<System.ServiceModel.Dispatcher.IParameterInspector>
Public ReadOnly Property ParameterInspectors As SynchronizedCollection(Of IParameterInspector)

속성 값

SynchronizedCollection<IParameterInspector>

IParameterInspector 구현 컬렉션입니다.

예제

다음 코드 예제에서는 속성의 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

설명

사용자 지정 ParameterInspectors 구현을 삽입하거나 현재 구현을 수정하려면 IParameterInspector 속성을 사용합니다. 매개 변수 검사자는 요청의 경우 컬렉션에 추가되는 순서대로 호출되고, 회신의 경우 역순으로 호출됩니다.

적용 대상