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 方法的同步和非同步 Variant。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)

適用於