IClientChannel IClientChannel IClientChannel IClientChannel Interface

定義

定義用戶端應用程式所使用之傳出要求和要求/回覆通道的行為。Defines the behavior of outbound request and request/reply channels used by client applications.

public interface class IClientChannel : IDisposable, System::ServiceModel::IContextChannel, System::ServiceModel::IExtensibleObject<System::ServiceModel::IContextChannel ^>
public interface IClientChannel : IDisposable, System.ServiceModel.IContextChannel, System.ServiceModel.IExtensibleObject<System.ServiceModel.IContextChannel>
type IClientChannel = interface
    interface IContextChannel
    interface ICommunicationObject
    interface IDisposable
    interface IChannel
    interface IExtensibleObject<IContextChannel>
Public Interface IClientChannel
Implements IContextChannel, IDisposable, IExtensibleObject(Of IContextChannel)
衍生
實作

備註

IClientChannel 介面會定義由 ChannelFactory<TChannel>.CreateChannel 的呼叫所傳回之所有通道支援的作業。The IClientChannel interface defines the operations supported by all channels returned by a call to ChannelFactory<TChannel>.CreateChannel. 您可以使用 IClientChannel 方法和屬性來檢查並修改傳出型別通道。Use the IClientChannel methods and properties to inspect and modify the outbound typed channel. ServiceModel Metadata Utility Tool (Svcutil.exe)匯出ClientBase<TChannel>類別和服務合約介面,藉由建立繼承自目標服務合約的合約介面和IClientChannel,可讓您為這兩個 proxy 服務來使用擴充的合約,以及存取用戶端通道。The ServiceModel Metadata Utility Tool (Svcutil.exe) exports both a ClientBase<TChannel> class and a service contract interface by creating a contract interface that inherits from both the target service contract and IClientChannel, enabling you to use the extended contract as both the proxy to the service and to access the client channel.

如需詳細資訊,請參閱 < WCF 用戶端架構For more information, see WCF Client Architecture. 例如它的外觀,產生的用戶端程式碼檔案中的詳細資訊,請參閱了解產生的用戶端程式碼For examples of its appearance in generated client code files, see Understanding Generated Client Code.

屬性

AllowInitializationUI AllowInitializationUI AllowInitializationUI AllowInitializationUI

取得或設定值,這個值表示 DisplayInitializationUI() 是否嘗試呼叫 IInteractiveChannelInitializer 屬性中的 InteractiveChannelInitializers 物件,或者是否擲回 (如果該集合不是空白的話)。Gets or sets a value indicating whether DisplayInitializationUI() attempts to call the IInteractiveChannelInitializer objects in the InteractiveChannelInitializers property or throws if that collection is not empty.

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.

(Inherited from IContextChannel)
DidInteractiveInitialization DidInteractiveInitialization DidInteractiveInitialization DidInteractiveInitialization

取得值,這個值表示是否已呼叫使用者介面,以取得認證資訊。Gets a value indicating whether a call was done to a user interface to obtain credential information.

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.

(Inherited from IContextChannel)
LocalAddress LocalAddress LocalAddress LocalAddress

取得通道的本機端點。Gets the local endpoint for the channel.

(Inherited from IContextChannel)
OperationTimeout OperationTimeout OperationTimeout OperationTimeout

取得或設定作業必須完成的期間,否則會擲回例外狀況。Gets or sets the time period within which an operation must complete or an exception is thrown.

(Inherited from IContextChannel)
OutputSession OutputSession OutputSession OutputSession

取得與通道相關聯的輸出工作階段 (如果有的話)。Gets the output session associated with the channel, if any.

(Inherited from IContextChannel)
RemoteAddress RemoteAddress RemoteAddress RemoteAddress

取得與通道相關聯的遠端位址。Gets the remote address associated with the channel.

(Inherited from IContextChannel)
SessionId SessionId SessionId SessionId

傳回目前工作階段的識別項 (如果有)。Returns an identifier for the current session, if any.

(Inherited from IContextChannel)
State State State State

取得通訊導向物件的目前狀態。Gets the current state of the communication-oriented object.

(Inherited from ICommunicationObject)
Via Via Via Via

取得包含在用戶端通道上傳送訊息之目標傳輸位址的 URI。Gets the URI that contains the transport address to which messages are sent on the client channel.

方法

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)
BeginDisplayInitializationUI(AsyncCallback, Object) BeginDisplayInitializationUI(AsyncCallback, Object) BeginDisplayInitializationUI(AsyncCallback, Object) BeginDisplayInitializationUI(AsyncCallback, Object)

要開始使用使用者介面來取得認證資訊的非同步呼叫。An asynchronous call to begin using a user interface to obtain credential information.

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)
DisplayInitializationUI() DisplayInitializationUI() DisplayInitializationUI() DisplayInitializationUI()

呼叫使用者介面來取得認證資訊。A call to a user interface to obtain credential information.

Dispose() Dispose() Dispose() Dispose()

執行與釋放 (Free)、釋放 (Release) 或重設 Unmanaged 資源相關聯之應用程式定義的工作。Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

(Inherited from IDisposable)
EndClose(IAsyncResult) EndClose(IAsyncResult) EndClose(IAsyncResult) EndClose(IAsyncResult)

完成非同步作業以關閉通訊物件。Completes an asynchronous operation to close a communication object.

(Inherited from ICommunicationObject)
EndDisplayInitializationUI(IAsyncResult) EndDisplayInitializationUI(IAsyncResult) EndDisplayInitializationUI(IAsyncResult) EndDisplayInitializationUI(IAsyncResult)

當呼叫 BeginDisplayInitializationUI(AsyncCallback, Object) 已完成時呼叫。Called when the call to BeginDisplayInitializationUI(AsyncCallback, Object) has finished.

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)
UnknownMessageReceived UnknownMessageReceived UnknownMessageReceived UnknownMessageReceived

這是保留的事件。This is a reserved event.

適用於