共用方式為


InstanceContext.OutgoingChannels 屬性

定義

取得從服務執行個體傳出的工作階段通道。

public:
 property System::Collections::Generic::ICollection<System::ServiceModel::Channels::IChannel ^> ^ OutgoingChannels { System::Collections::Generic::ICollection<System::ServiceModel::Channels::IChannel ^> ^ get(); };
public System.Collections.Generic.ICollection<System.ServiceModel.Channels.IChannel> OutgoingChannels { get; }
member this.OutgoingChannels : System.Collections.Generic.ICollection<System.ServiceModel.Channels.IChannel>
Public ReadOnly Property OutgoingChannels As ICollection(Of IChannel)

屬性值

ICollection<IChannel>

ICollection<T> 型別的 IChannel,其中包含從服務執行個體傳出的工作階段通道。

例外狀況

服務執行個體已關閉,無法使用。

服務執行個體處於錯誤狀態。

範例

下列程式碼說明如何存取 OutgoingChannels 屬性︰

OperationContext operationContext = OperationContext.Current;
InstanceContext instanceContext = operationContext.InstanceContext;
ICollection<IChannel> OutgoingChannels = instanceContext.OutgoingChannels;

適用於