次の方法で共有


EndpointDispatcher.DispatchRuntime プロパティ

定義

サービス エンドポイントまたはクライアント コールバック エンドポイント全体で実行時の動作を検査、変更、または拡張するために使用する DispatchRuntime オブジェクトを取得します。

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

プロパティ値

サービス エンドポイントまたはクライアント コールバック エンドポイント全体で実行時の動作を検査、変更、または拡張するために使用される DispatchRuntime オブジェクト。

次のコード例は、 EndpointDispatcher を使用してエンドポイントの System.ServiceModel.Dispatcher.DispatchRuntime を検索し、エンドポイントの動作を使用してカスタム メッセージ インスペクターを挿入する方法を示しています。

// 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;
}

注釈

DispatchRuntime プロパティを使用して、ランタイム値を変更したり、エンドポイント全体のカスタムランタイム拡張機能を挿入したりするためのDispatchRuntime オブジェクトを取得します。 DispatchRuntimeプロパティから、エンドポイントのSystem.ServiceModel.Dispatcher.DispatchOperation コレクションに移動することもできます。

適用対象