IContextChannel 介面

定義

Defines the interface for the context control of a channel.Defines the interface for the context control of a channel.

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

備註

重要

呼叫實作此介面之類別的方法時,若並用了不信任的資料,會造成安全性上的風險。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.

IContextChannel 會定義通道內容的控制項。The IContextChannel defines the controls for the context of a channel. 這包括通道的 SessionIdInputSessionOutputSessionAllowOutputBatching,以及參與會話的端點 LocalAddressRemoteAddressThis includes the SessionId, InputSession, OutputSession, and AllowOutputBatching for the channel, and the LocalAddress and RemoteAddress for the endpoints participating in the session. IContextChannel 介面會形成 IServiceChannelIClientChannel 介面和 IDuplexContextChannel 介面的一部分。The IContextChannel interface forms part of the IServiceChannel and IClientChannel interfaces and of the IDuplexContextChannel interface.

屬性

AllowOutputBatching

Gets or sets a value that instructs Windows Communication Foundation (WCF) to store a set of messages before giving the messages to the transport.Gets or sets a value that instructs Windows Communication Foundation (WCF) to store a set of messages before giving the messages to the transport.

Extensions

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

(繼承來源 IExtensibleObject<T>)
InputSession

Gets the input session for the channel.Gets the input session for the channel.

LocalAddress

Gets the local endpoint for the channel.Gets the local endpoint for the channel.

OperationTimeout

Gets or sets the time period within which an operation must complete or an exception is thrown.Gets or sets the time period within which an operation must complete or an exception is thrown.

OutputSession

Gets the output session associated with the channel, if any.Gets the output session associated with the channel, if any.

RemoteAddress

Gets the remote address associated with the channel.Gets the remote address associated with the channel.

SessionId

Returns an identifier for the current session, if any.Returns an identifier for the current session, if any.

State

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

(繼承來源 ICommunicationObject)

方法

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)
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)
GetProperty<T>()

Returns a typed object requested, if present, from the appropriate layer in the channel stack.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)

事件

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)

適用於