Condividi tramite


EndpointDispatcher.DispatchRuntime Proprietà

Definizione

Ottiene l'oggetto DispatchRuntime utilizzato per esaminare, modificare o estendere il comportamento di runtime in un endpoint di servizio o in un endpoint di callback client.

public:
 property System::ServiceModel::Dispatcher::DispatchRuntime ^ DispatchRuntime { System::ServiceModel::Dispatcher::DispatchRuntime ^ get(); };
public System.ServiceModel.Dispatcher.DispatchRuntime DispatchRuntime { get; }
member this.DispatchRuntime : System.ServiceModel.Dispatcher.DispatchRuntime
Public ReadOnly Property DispatchRuntime As DispatchRuntime

Valore della proprietà

Oggetto DispatchRuntime utilizzato per esaminare, modificare o estendere il comportamento di runtime in un endpoint di servizio o in un endpoint di callback client.

Esempio

Nell'esempio di codice seguente viene illustrato l'uso di EndpointDispatcher per individuare l'oggetto System.ServiceModel.Dispatcher.DispatchRuntime per l'endpoint e inserisce un controllo messaggi personalizzato usando un comportamento dell'endpoint.

// IEndpointBehavior Members
public void AddBindingParameters(ServiceEndpoint serviceEndpoint, System.ServiceModel.Channels.BindingParameterCollection bindingParameters)
{
  return;
}

public void ApplyClientBehavior(ServiceEndpoint serviceEndpoint, ClientRuntime behavior)
{
  behavior.MessageInspectors.Add(new EndpointBehaviorMessageInspector());
}

public void ApplyDispatchBehavior(ServiceEndpoint serviceEndpoint, EndpointDispatcher endpointDispatcher)
{
  endpointDispatcher.DispatchRuntime.MessageInspectors.Add(new EndpointBehaviorMessageInspector());
}

public void Validate(ServiceEndpoint serviceEndpoint)
{
  return;
}

Commenti

Utilizzare la DispatchRuntime proprietà per ottenere l'oggetto DispatchRuntime per modificare i valori di runtime o inserire estensioni di runtime personalizzate per l'intero endpoint. DispatchRuntime Dalla proprietà è anche possibile passare alla System.ServiceModel.Dispatcher.DispatchOperation raccolta per l'endpoint.

Si applica a