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 客户端访问服务

适用于