IClientChannel Interface

Definition

定義用戶端應用程式所使用之傳出要求和要求/回覆通道的行為。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 IDisposable
    interface IChannel
    interface ICommunicationObject
    interface IContextChannel
    interface IExtensibleObject<IContextChannel>
type IClientChannel = interface
    interface IDisposable
    interface IContextChannel
    interface IChannel
    interface ICommunicationObject
    interface IExtensibleObject<IContextChannel>
type IClientChannel = interface
    interface IContextChannel
    interface IChannel
    interface ICommunicationObject
    interface IExtensibleObject<IContextChannel>
    interface IDisposable
type IClientChannel = interface
    interface IContextChannel
    interface ICommunicationObject
    interface IDisposable
    interface IChannel
    interface IExtensibleObject<IContextChannel>
Public Interface IClientChannel
Implements IContextChannel, IDisposable, IExtensibleObject(Of IContextChannel)
Derived
Implements

Remarks

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. System.servicemodel 中繼資料公用程式工具(Svcutil)會藉由建立同時繼承目標服務合約和 IClientChannel的合約介面,以匯出 ClientBase<TChannel> 類別和服務合約介面,讓您使用擴充的合約做為服務的 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.

Properties

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

取得或設定值,這個值會指示 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

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

Extensions

取得這個可擴充物件的擴充功能物件集合。Gets a collection of extension objects for this extensible object.

(Inherited from IExtensibleObject<T>)
InputSession

取得通道的輸入工作階段。Gets the input session for the channel.

(Inherited from IContextChannel)
LocalAddress

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

(Inherited from IContextChannel)
OperationTimeout

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

(Inherited from IContextChannel)
OutputSession

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

(Inherited from IContextChannel)
RemoteAddress

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

(Inherited from IContextChannel)
SessionId

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

(Inherited from IContextChannel)
State

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

(Inherited from ICommunicationObject)
Via

取得包含在用戶端通道上傳送訊息之目標傳輸位址的 URI。Gets the URI that contains the transport address to which messages are sent on the client 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)
BeginDisplayInitializationUI(AsyncCallback, Object)

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

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

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

Dispose()

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

(Inherited from IDisposable)
EndClose(IAsyncResult)

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

(Inherited from ICommunicationObject)
EndDisplayInitializationUI(IAsyncResult)

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

EndOpen(IAsyncResult)

完成非同步作業以開啟通訊物件。Completes an asynchronous operation to open a communication object.

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

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

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

Applies to