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;

适用于