ChannelDispatcherCollection.InsertItem(Int32, ChannelDispatcherBase) 方法

定義

將通道發送器插入至集合中指定的索引位置。

protected:
 override void InsertItem(int index, System::ServiceModel::Dispatcher::ChannelDispatcherBase ^ item);
protected override void InsertItem (int index, System.ServiceModel.Dispatcher.ChannelDispatcherBase item);
override this.InsertItem : int * System.ServiceModel.Dispatcher.ChannelDispatcherBase -> unit
Protected Overrides Sub InsertItem (index As Integer, item As ChannelDispatcherBase)

參數

index
Int32

要從集合擷取之通道發送器的索引 (以零起始)。

item
ChannelDispatcherBase

要插入至集合成為其中項目的通道發送器。

例外狀況

與通道發送器集合相關聯的服務主機已關閉。

指定的 index 小於零或大於集合中的項目數。

通訊物件未處於某個狀態中。

適用於