ChannelDispatcherBase 類別

定義

通道發送器的抽象基底類別,這個發送器會接受通道並使它們與服務產生關聯。Abstract base class for the channel dispatcher that accepts channels and associates them with a service.

public ref class ChannelDispatcherBase abstract : System::ServiceModel::Channels::CommunicationObject
public abstract class ChannelDispatcherBase : System.ServiceModel.Channels.CommunicationObject
type ChannelDispatcherBase = class
    inherit CommunicationObject
Public MustInherit Class ChannelDispatcherBase
Inherits CommunicationObject
繼承
ChannelDispatcherBase
衍生

備註

這是供想要將 Windows Communication Foundation (WCF) 程式設計模型,但取代系統提供的執行時間之開發人員使用。This is used by developers who want to keep the Windows Communication Foundation (WCF) programming model but replace the system-provided runtime. 這類應用程式會從通道提取訊息,並且透過使用者定義的發送器直接處理訊息。Such applications will pull messages out of channels and handle them directly with user-defined dispatchers. 若要使用 ChannelDispatcherBase,請從這個類別衍生類別,接著擴充 ServiceHost 和覆寫 InitializeRuntime,並將您衍生自 ChannelDispatcherBase 類別的執行個體加入至 ChannelDispatchersTo use ChannelDispatcherBase , create a class derived from it, extend ServiceHost and override InitializeRuntime, adding instances of your class derived from ChannelDispatcherBase to ChannelDispatchers.

IChannelListener 物件關聯的 ServiceHostChannelDispatcherBase,可以分別透過 ListenerHost 進行檢查或修改。The IChannelListener and the ServiceHost, associated with the ChannelDispatcherBase object are available for inspection or modification through the Listener and Host respectively.

ServiceHost 會在其 Attach(ServiceHostBase) 集合中加入或移除 Detach(ServiceHostBase) 項目時,呼叫 ChannelDispatcherBaseChannelDispatchers 方法。ServiceHost calls the Attach(ServiceHostBase) or Detach(ServiceHostBase) methods when adding or removing a ChannelDispatcherBase item from its ChannelDispatchers collection.

ServiceHost 會在關閉 InstanceContexts 之前的關機期間呼叫 CloseInputServiceHost calls the CloseInput during shutdown before closing InstanceContexts. Windows Communication Foundation (WCF) 會使用此呼叫來關閉資料包通道,並等候所有訊息進入 InstanceCoNtext。Windows Communication Foundation (WCF) uses this call to close datagram channels and wait for all messages to get to an InstanceContext.

建構函式

ChannelDispatcherBase()

初始化 ChannelDispatcherBase 類別的新執行個體。Initializes a new instance of the ChannelDispatcherBase class.

屬性

DefaultCloseTimeout

在衍生類別中覆寫時,取得提供用來讓關閉作業完成的預設時間間隔。When overridden in a derived class, gets the default interval of time provided for a close operation to complete.

(繼承來源 CommunicationObject)
DefaultOpenTimeout

在衍生類別中覆寫時,取得提供用來讓開啟作業完成的預設時間間隔。When overridden in a derived class, gets the default interval of time provided for an open operation to complete.

(繼承來源 CommunicationObject)
Host

在衍生類別中覆寫時,取得與通道發送器相關聯的服務主機。When overridden in a derived class, gets the service host associated with the channel dispatcher.

IsDisposed

取得值,這個值會指出是否已經處置通訊物件。Gets a value that indicates whether the communication object has been disposed.

(繼承來源 CommunicationObject)
Listener

在衍生類別中覆寫時,取得與通道發送器相關聯的通道接聽程式 (Listener)。When overridden in a derived class, gets the channel listener associated with the channel dispatcher.

State

取得值,這個值表示通訊物件目前的狀態。Gets a value that indicates the current state of the communication object.

(繼承來源 CommunicationObject)
ThisLock

取得會在狀態轉換期間保護類別執行個體的互斥鎖定。Gets the mutually exclusive lock that protects the class instance during a state transition.

(繼承來源 CommunicationObject)

方法

Abort()

導致通訊物件立即從目前的狀態轉換為關閉狀態。Causes a communication object to transition immediately from its current state into the closing state.

(繼承來源 CommunicationObject)
Attach(ServiceHostBase)

在衍生類別中覆寫時,將通道發送器附加至特定的主機。When overridden in a derived class, attaches the channel dispatcher to a specific host.

BeginClose(AsyncCallback, Object)

開始非同步作業以關閉通訊物件。Begins an asynchronous operation to close a communication object.

(繼承來源 CommunicationObject)
BeginClose(TimeSpan, AsyncCallback, Object)

開始非同步作業,關閉有已指定逾時的通訊物件。Begins an asynchronous operation to close a communication object with a specified timeout.

(繼承來源 CommunicationObject)
BeginOpen(AsyncCallback, Object)

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

(繼承來源 CommunicationObject)
BeginOpen(TimeSpan, AsyncCallback, Object)

開始非同步作業,開啟有已指定時間間隔的通訊物件。Begins an asynchronous operation to open a communication object within a specified interval of time.

(繼承來源 CommunicationObject)
Close()

導致通訊物件從目前的狀態轉換為已關閉狀態。Causes a communication object to transition from its current state into the closed state.

(繼承來源 CommunicationObject)
Close(TimeSpan)

在指定時間間隔內,讓通訊物件從目前的狀態轉換為已關閉狀態。Causes a communication object to transition from its current state into the closed state within a specified interval of time.

(繼承來源 CommunicationObject)
CloseInput()

在衍生類別中覆寫時,移除與通道發送器相關聯的端點發送器。When overridden in a derived class, removes the endpoint dispatchers associated with the channel dispatcher.

Detach(ServiceHostBase)

在衍生類別中覆寫時,從特定主機中斷通道發送器的連結。When overridden in a derived class, detaches the channel dispatcher from a specific host.

EndClose(IAsyncResult)

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

(繼承來源 CommunicationObject)
EndOpen(IAsyncResult)

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

(繼承來源 CommunicationObject)
Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
Fault()

導致通訊物件從目前的狀態轉換為錯誤狀態。Causes a communication object to transition from its current state into the faulted state.

(繼承來源 CommunicationObject)
GetCommunicationObjectType()

取得通訊物件的型別。Gets the type of communication object.

(繼承來源 CommunicationObject)
GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(繼承來源 Object)
GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(繼承來源 Object)
OnAbort()

在通訊物件上插入處理 (當它因為叫用同步中止作業而轉換到關閉狀態之後)。Inserts processing on a communication object after it transitions to the closing state due to the invocation of a synchronous abort operation.

(繼承來源 CommunicationObject)
OnBeginClose(TimeSpan, AsyncCallback, Object)

在通訊物件因為叫用非同步關閉作業而轉換到關閉狀態後,插入處理。Inserts processing after a communication object transitions to the closing state due to the invocation of an asynchronous close operation.

(繼承來源 CommunicationObject)
OnBeginOpen(TimeSpan, AsyncCallback, Object)

在通訊物件上插入處理 (當它因為叫用非同步開啟作業而轉換到開啟狀態之後)。Inserts processing on a communication object after it transitions to the opening state due to the invocation of an asynchronous open operation.

(繼承來源 CommunicationObject)
OnClose(TimeSpan)

在通訊物件上插入處理 (當它因為叫用同步關閉作業而轉換到關閉狀態之後)。Inserts processing on a communication object after it transitions to the closing state due to the invocation of a synchronous close operation.

(繼承來源 CommunicationObject)
OnClosed()

在將通訊物件轉換為關閉狀態期間會叫用。Invoked during the transition of a communication object into the closing state.

(繼承來源 CommunicationObject)
OnClosing()

在將通訊物件轉換為關閉狀態期間會叫用。Invoked during the transition of a communication object into the closing state.

(繼承來源 CommunicationObject)
OnEndClose(IAsyncResult)

在關閉通訊物件時完成非同步作業。Completes an asynchronous operation on the close of a communication object.

(繼承來源 CommunicationObject)
OnEndOpen(IAsyncResult)

在開啟通訊物件時完成非同步作業。Completes an asynchronous operation on the open of a communication object.

(繼承來源 CommunicationObject)
OnFaulted()

在通訊物件上插入處理 (當它因為叫用同步錯誤作業而轉換到錯誤狀態之後)。Inserts processing on a communication object after it transitions to the faulted state due to the invocation of a synchronous fault operation.

(繼承來源 CommunicationObject)
OnOpen(TimeSpan)

在通訊物件上插入處理 (當它轉換到開啟狀態之後),此作業必須在指定的時間間隔內完成。Inserts processing on a communication object after it transitions into the opening state which must complete within a specified interval of time.

(繼承來源 CommunicationObject)
OnOpened()

在將通訊物件轉換至已開啟狀態期間會叫用。Invoked during the transition of a communication object into the opened state.

(繼承來源 CommunicationObject)
OnOpening()

在將通訊物件轉換至開啟狀態期間會叫用。Invoked during the transition of a communication object into the opening state.

(繼承來源 CommunicationObject)
Open()

導致通訊物件從已建立狀態轉換為已開啟狀態。Causes a communication object to transition from the created state into the opened state.

(繼承來源 CommunicationObject)
Open(TimeSpan)

在指定時間間隔內,讓通訊物件從已建立狀態轉換為已開啟狀態。Causes a communication object to transition from the created state into the opened state within a specified interval of time.

(繼承來源 CommunicationObject)
ThrowIfDisposed()

如果已處置通訊物件,則會擲回例外狀況。Throws an exception if the communication object is disposed.

(繼承來源 CommunicationObject)
ThrowIfDisposedOrImmutable()

如果通訊物件的 State 屬性並未設定為 Created 狀態,就會擲回例外狀況。Throws an exception if the communication object the State property is not set to the Created state.

(繼承來源 CommunicationObject)
ThrowIfDisposedOrNotOpen()

如果通訊物件不是處於 Opened 狀態,就會擲回例外狀況。Throws an exception if the communication object is not in the Opened state.

(繼承來源 CommunicationObject)
ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)

事件

Closed

當通訊物件轉換至已關閉狀態時發生。Occurs when a communication object transitions into the closed state.

(繼承來源 CommunicationObject)
Closing

當通訊物件轉換至關閉狀態時就會發生。Occurs when a communication object transitions into the closing state.

(繼承來源 CommunicationObject)
Faulted

當通訊物件轉換至錯誤狀態時發生。Occurs when a communication object transitions into the faulted state.

(繼承來源 CommunicationObject)
Opened

當通訊物件轉換至已開啟狀態時發生。Occurs when a communication object transitions into the opened state.

(繼承來源 CommunicationObject)
Opening

當通訊物件轉換至開啟狀態時發生。Occurs when a communication object transitions into the opening state.

(繼承來源 CommunicationObject)

適用於