IChannelInitializer 介面

定義

定義要在通道建立時通知服務或用戶端的介面。Defines the interface to notify a service or client when a channel is created.

public interface class IChannelInitializer
public interface IChannelInitializer
type IChannelInitializer = interface
Public Interface IChannelInitializer

備註

定義介面,這是在通道第一次建立時要用來檢查通道以及加入通道狀態的介面。Defines the interface used to inspect and add state to channels when they are first created. 這個通道可以用來追蹤所有未處理的工作階段,比方說,這樣一來,服務就可以在這些工作階段上傳送訊息。This can be used to track all outstanding sessions, for instance, so the service can send messages on them. 將服務通道初始設定式加入至 ChannelDispatcher.ChannelInitializers 集合。Add service channel initializers to the ChannelDispatcher.ChannelInitializers collection. 將用戶端通道初始設定式加入至 ClientRuntime.ChannelInitializers 集合。Add client channel initializers to the ClientRuntime.ChannelInitializers collection.

方法

Initialize(IClientChannel)

使用指定的 IChannelInitializer,初始化 IClientChannel 類別。Initializes the IChannelInitializer class with a specified IClientChannel.

適用於