IContextChannel IContextChannel IContextChannel IContextChannel Interface

定义

定义通道的上下文控件接口。Defines the interface for the context control of a channel.

public interface class IContextChannel : System::ServiceModel::Channels::IChannel, System::ServiceModel::IExtensibleObject<System::ServiceModel::IContextChannel ^>
public interface IContextChannel : System.ServiceModel.Channels.IChannel, System.ServiceModel.IExtensibleObject<System.ServiceModel.IContextChannel>
type IContextChannel = interface
    interface IChannel
    interface ICommunicationObject
    interface IExtensibleObject<IContextChannel>
Public Interface IContextChannel
Implements IChannel, IExtensibleObject(Of IContextChannel)
派生
实现

注解

重要

使用不受信任的数据从实现此接口的类中调用方法存在安全风险。Calling methods from classes that implement this interface with untrusted data is a security risk. 仅使用受信任的数据从实现此接口的类中调用方法。Call the methods from classes that implement this interface only with trusted data. 有关详细信息,请参阅数据验证For more information, see Data Validation.

IContextChannel 定义通道的上下文控件。The IContextChannel defines the controls for the context of a channel. 这些控件包括用于通道的 SessionIdInputSessionOutputSessionAllowOutputBatching,以及用于参与会话的终结点的 LocalAddressRemoteAddressThis includes the SessionId, InputSession, OutputSession, and AllowOutputBatching for the channel, and the LocalAddress and RemoteAddress for the endpoints participating in the session. IContextChannel 接口构成 IServiceChannel 接口和 IClientChannel 接口的一部分,以及 IDuplexContextChannel 接口的一部分。The IContextChannel interface forms part of the IServiceChannel and IClientChannel interfaces and of the IDuplexContextChannel interface.

属性

AllowOutputBatching AllowOutputBatching AllowOutputBatching AllowOutputBatching

获取或设置一个值,该值指示 Windows Communication Foundation (WCF) 在给出消息以进行传输之前存储一组消息。Gets or sets a value that instructs Windows Communication Foundation (WCF) to store a set of messages before giving the messages to the transport.

Extensions Extensions Extensions Extensions

获取此可扩展对象的扩展对象集合。Gets a collection of extension objects for this extensible object.

(Inherited from IExtensibleObject<T>)
InputSession InputSession InputSession InputSession

获取通道的输入会话。Gets the input session for the channel.

LocalAddress LocalAddress LocalAddress LocalAddress

获取通道的本地终结点。Gets the local endpoint for the channel.

OperationTimeout OperationTimeout OperationTimeout OperationTimeout

获取或设置一个时间段,操作必须在此时间段内完成否则将引发异常。Gets or sets the time period within which an operation must complete or an exception is thrown.

OutputSession OutputSession OutputSession OutputSession

获取与通道关联的输出会话(如果有)。Gets the output session associated with the channel, if any.

RemoteAddress RemoteAddress RemoteAddress RemoteAddress

获取与通道关联的远程地址。Gets the remote address associated with the channel.

SessionId SessionId SessionId SessionId

返回当前会话的标识符(如果有)。Returns an identifier for the current session, if any.

State State State State

获取面向通信的对象的当前状态。Gets the current state of the communication-oriented object.

(Inherited from ICommunicationObject)

方法

Abort() Abort() Abort() Abort()

使通信对象立即从其当前状态转换到关闭状态。Causes a communication object to transition immediately from its current state into the closed state.

(Inherited from ICommunicationObject)
BeginClose(AsyncCallback, Object) BeginClose(AsyncCallback, Object) BeginClose(AsyncCallback, Object) BeginClose(AsyncCallback, Object)

开始一个异步操作以关闭通信对象。Begins an asynchronous operation to close a communication object.

(Inherited from ICommunicationObject)
BeginClose(TimeSpan, AsyncCallback, Object) BeginClose(TimeSpan, AsyncCallback, Object) BeginClose(TimeSpan, AsyncCallback, Object) BeginClose(TimeSpan, AsyncCallback, Object)

开始一个异步操作以在指定超时内关闭通信对象。Begins an asynchronous operation to close a communication object with a specified timeout.

(Inherited from ICommunicationObject)
BeginOpen(AsyncCallback, Object) BeginOpen(AsyncCallback, Object) BeginOpen(AsyncCallback, Object) BeginOpen(AsyncCallback, Object)

开始一个异步操作以打开通信对象。Begins an asynchronous operation to open a communication object.

(Inherited from ICommunicationObject)
BeginOpen(TimeSpan, AsyncCallback, Object) BeginOpen(TimeSpan, AsyncCallback, Object) BeginOpen(TimeSpan, AsyncCallback, Object) BeginOpen(TimeSpan, AsyncCallback, Object)

开始一个异步操作以在指定时间间隔内打开通信对象。Begins an asynchronous operation to open a communication object within a specified interval of time.

(Inherited from ICommunicationObject)
Close() Close() Close() Close()

使通信对象从其当前状态转换到关闭状态。Causes a communication object to transition from its current state into the closed state.

(Inherited from ICommunicationObject)
Close(TimeSpan) Close(TimeSpan) Close(TimeSpan) Close(TimeSpan)

使通信对象从其当前状态转换到关闭状态。Causes a communication object to transition from its current state into the closed state.

(Inherited from ICommunicationObject)
EndClose(IAsyncResult) EndClose(IAsyncResult) EndClose(IAsyncResult) EndClose(IAsyncResult)

完成一个异步操作以关闭通信对象。Completes an asynchronous operation to close a communication object.

(Inherited from ICommunicationObject)
EndOpen(IAsyncResult) EndOpen(IAsyncResult) EndOpen(IAsyncResult) EndOpen(IAsyncResult)

完成一个异步操作以打开通信对象。Completes an asynchronous operation to open a communication object.

(Inherited from ICommunicationObject)
GetProperty<T>() GetProperty<T>() GetProperty<T>() GetProperty<T>()

从通道堆栈的适当层返回所请求的类型化对象(如果存在)。Returns a typed object requested, if present, from the appropriate layer in the channel stack.

(Inherited from IChannel)
Open() Open() Open() Open()

使通信对象从已创建状态转换到已打开状态。Causes a communication object to transition from the created state into the opened state.

(Inherited from ICommunicationObject)
Open(TimeSpan) Open(TimeSpan) Open(TimeSpan) Open(TimeSpan)

使通信对象在指定时间间隔内从已创建状态转换到已打开状态。Causes a communication object to transition from the created state into the opened state within a specified interval of time.

(Inherited from ICommunicationObject)

事件

Closed Closed Closed Closed

当通信对象完成从正在关闭状态转换到已关闭状态时发生。Occurs when the communication object completes its transition from the closing state into the closed state.

(Inherited from ICommunicationObject)
Closing Closing Closing Closing

当通信对象首次进入正在关闭状态时发生。Occurs when the communication object first enters the closing state.

(Inherited from ICommunicationObject)
Faulted Faulted Faulted Faulted

当通信对象首次进入出错状态时发生。Occurs when the communication object first enters the faulted state.

(Inherited from ICommunicationObject)
Opened Opened Opened Opened

当通信对象完成从正在打开状态转换到已打开状态时发生。Occurs when the communication object completes its transition from the opening state into the opened state.

(Inherited from ICommunicationObject)
Opening Opening Opening Opening

当通信对象首次进入正在打开状态时发生。Occurs when the communication object first enters the opening state.

(Inherited from ICommunicationObject)

适用于