共用方式為


ClientRuntime.InteractiveChannelInitializers 屬性

定義

取得互動式通道初始設定式的集合。

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

屬性值

型別為 IInteractiveChannelInitializer 的已同步處理集合。

範例

下列程式碼範例示範如何使用端點行為來插入互動式通道初始化運算式。

public void ApplyClientBehavior(ServiceEndpoint endpoint, ClientRuntime clientRuntime)
{
  clientRuntime.InteractiveChannelInitializers.Add(new InteractiveChannelInitializer());
  clientRuntime.MessageInspectors.Add(new Inspector());
  foreach (ClientOperation op in clientRuntime.Operations)
    op.ParameterInspectors.Add(new Inspector());
}
Public Sub ApplyClientBehavior(ByVal endpoint As ServiceEndpoint, ByVal clientRuntime As ClientRuntime) Implements IEndpointBehavior.ApplyClientBehavior
  clientRuntime.InteractiveChannelInitializers.Add(New InteractiveChannelInitializer())
  clientRuntime.MessageInspectors.Add(New Inspector())
  For Each op As ClientOperation In clientRuntime.Operations
    op.ParameterInspectors.Add(New Inspector())
  Next op
End Sub

備註

如需如何使用互動式通道初始化運算式的詳細資訊,請參閱 使用 WCF 用戶端存取服務

適用於