IRequestChannel 接口

定义

定义一个协定,通道必须实现该协定,才能成为消息传递终结点之间的请求-回复通信的请求端。Defines the contract that a channel must implement to be on the requesting side of a request-reply communication between messaging endpoints.

public interface class IRequestChannel : System::ServiceModel::Channels::IChannel
public interface IRequestChannel : System.ServiceModel.Channels.IChannel
type IRequestChannel = interface
    interface IChannel
    interface ICommunicationObject
Public Interface IRequestChannel
Implements IChannel
派生
实现

注解

重要

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

IRequestChannel 定义返回响应消息的 IRequestChannel.Request 方法的同步和异步版本。The IRequestChannel defines synchronous and asynchronous variants of a IRequestChannel.Request method that returns a response message. 它还提供了 RemoteAddressVia 属性来检索请求消息所发送到的终结点地址和 URI。It also provides a RemoteAddress and Via properties to retrieve the endpoint address and URI to which the request message is sent.

属性

RemoteAddress

获取请求通道将消息发送到的远程地址。Gets the remote address to which the request channel sends messages.

State

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

(继承自 ICommunicationObject)
Via

获取发送请求的目标传输地址。Gets the transport address to which the request is send.

方法

Abort()

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

(继承自 ICommunicationObject)
BeginClose(AsyncCallback, Object)

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

(继承自 ICommunicationObject)
BeginClose(TimeSpan, AsyncCallback, Object)

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

(继承自 ICommunicationObject)
BeginOpen(AsyncCallback, Object)

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

(继承自 ICommunicationObject)
BeginOpen(TimeSpan, AsyncCallback, Object)

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

(继承自 ICommunicationObject)
BeginRequest(Message, AsyncCallback, Object)

开始一个异步操作,将请求消息传送到请求-回复消息交换的回复端。Begins an asynchronous operation to transmit a request message to the reply side of a request-reply message exchange.

BeginRequest(Message, TimeSpan, AsyncCallback, Object)

开始一个异步操作,在指定时间间隔内将请求消息传送到请求-回复消息交换的回复端。Begins an asynchronous operation to transmit a request message to the reply side of a request-reply message exchange within a specified interval of time.

Close()

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

(继承自 ICommunicationObject)
Close(TimeSpan)

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

(继承自 ICommunicationObject)
EndClose(IAsyncResult)

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

(继承自 ICommunicationObject)
EndOpen(IAsyncResult)

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

(继承自 ICommunicationObject)
EndRequest(IAsyncResult)

完成异步操作以向传送的请求返回基于消息的响应。Completes an asynchronous operation to return a message-based response to a transmitted request.

GetProperty<T>()

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

(继承自 IChannel)
Open()

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

(继承自 ICommunicationObject)
Open(TimeSpan)

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

(继承自 ICommunicationObject)
Request(Message)

发送一个基于消息的请求,并返回相关的基于消息的响应。Sends a message-based request and returns the correlated message-based response.

Request(Message, TimeSpan)

发送一个基于消息的请求,并在指定的时间间隔内返回相关的基于消息的响应。Sends a message-based request and returns the correlated message-based response within a specified interval of time.

事件

Closed

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

(继承自 ICommunicationObject)
Closing

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

(继承自 ICommunicationObject)
Faulted

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

(继承自 ICommunicationObject)
Opened

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

(继承自 ICommunicationObject)
Opening

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

(继承自 ICommunicationObject)

适用于