Aracılığıyla paylaş


ClientRuntime.Operations Özellik

Tanım

bir istemci için istemci işlemleri koleksiyonunu alır.

public:
 property System::Collections::Generic::SynchronizedKeyedCollection<System::String ^, System::ServiceModel::Dispatcher::ClientOperation ^> ^ Operations { System::Collections::Generic::SynchronizedKeyedCollection<System::String ^, System::ServiceModel::Dispatcher::ClientOperation ^> ^ get(); };
public System.Collections.Generic.SynchronizedKeyedCollection<string,System.ServiceModel.Dispatcher.ClientOperation> Operations { get; }
member this.Operations : System.Collections.Generic.SynchronizedKeyedCollection<string, System.ServiceModel.Dispatcher.ClientOperation>
Public ReadOnly Property Operations As SynchronizedKeyedCollection(Of String, ClientOperation)

Özellik Değeri

Eşitlenmiş nesne koleksiyonu ClientOperation .

Örnekler

Aşağıdaki kod örneğinde, System.ServiceModel.Description.IEndpointBehavior özelliğindeki her ClientOperation birine ekleyerek istemci çalışma zamanına Operations bir System.ServiceModel.Dispatcher.IParameterInspector ekler.

#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

Açıklamalar

Belirli bir işlem kapsamındaki Operations iletileri ve davranışı inceleyen veya değiştiren uzantı nesnelerini eklemek için kullanabileceğiniz bu istemci için tüm istemci işlemlerinin bir koleksiyonunu almak için özelliğini kullanın. Ayrıntılar için bkz. ClientOperation.

Şunlara uygulanır