IOutputChannel Interface

Definition

定义通道为发送消息而必须实现的接口。Defines the interface that a channel must implement to send a message.

public interface class IOutputChannel : System::ServiceModel::Channels::IChannel
public interface IOutputChannel : System.ServiceModel.Channels.IChannel
type IOutputChannel = interface
    interface IChannel
    interface ICommunicationObject
Public Interface IOutputChannel
Implements IChannel
Derived
Implements

Remarks

Important

使用不受信任的数据从实现此接口的类中调用方法存在安全风险。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.

IOutputChannel 接口定义 IOutputChannel.Send 操作的同步变量和异步变量。The IOutputChannel interface defines synchronous and asynchronous variants of the IOutputChannel.Send operation. 该接口为通道上发送出去的消息的目标提供 RemoteAddressIt provides a RemoteAddress for the destination of the messages sent out on the channel.

Properties

RemoteAddress

获取在输出通道上发出的消息将要到达的服务的目标。Gets the destination of the service to which messages are sent out on the output channel.

State

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

(Inherited from ICommunicationObject)
Via

获取 URI,该 URI 包含输出通道发送消息的目标传输地址。Gets the URI that contains the transport address to which messages are sent on the output channel.

Methods

Abort()

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

(Inherited from ICommunicationObject)
BeginClose(AsyncCallback, Object)

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

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

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

(Inherited from ICommunicationObject)
BeginOpen(AsyncCallback, Object)

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

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

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

(Inherited from ICommunicationObject)
BeginSend(Message, AsyncCallback, Object)

开始一个异步操作,向输出通道的目标传输一条消息。Begins an asynchronous operation to transmit a message to the destination of the output channel.

BeginSend(Message, TimeSpan, AsyncCallback, Object)

开始一个异步操作,在指定时间间隔内向输出通道的目标传输消息。Begins an asynchronous operation to transmit a message to the destination of the output channel within a specified interval of time.

Close()

让通信对象的状态从当前值变成“已关闭”。Causes a communication object to transition from its current state into the closed state.

(Inherited from ICommunicationObject)
Close(TimeSpan)

让通信对象的状态从当前值变成“已关闭”。Causes a communication object to transition from its current state into the closed state.

(Inherited from ICommunicationObject)
EndClose(IAsyncResult)

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

(Inherited from ICommunicationObject)
EndOpen(IAsyncResult)

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

(Inherited from ICommunicationObject)
EndSend(IAsyncResult)

完成一个异步操作,向输出通道的目标传输消息。Completes an asynchronous operation to transmit a message to the destination of the output channel.

GetProperty<T>()

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

(Inherited from IChannel)
Open()

让通信对象的状态从“已创建”变成“已打开”。Causes a communication object to transition from the created state into the opened state.

(Inherited from ICommunicationObject)
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)
Send(Message)

向输出通道的目标传输一条消息。Transmits a message to the destination of the output channel.

Send(Message, TimeSpan)

在指定时间间隔内在当前输出通道上发送一条消息。Sends a message on the current output channel within a specified interval of time.

Events

Closed

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

(Inherited from ICommunicationObject)
Closing

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

(Inherited from ICommunicationObject)
Faulted

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

(Inherited from ICommunicationObject)
Opened

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

(Inherited from ICommunicationObject)
Opening

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

(Inherited from ICommunicationObject)

Applies to