WorkflowServiceHost 類別

定義

警告

The WF3 types are deprecated. Instead, please use the new WF4 types from System.Activities.*

提供工作流程式之服務的主機。Provides host for workflow-based services.

public ref class WorkflowServiceHost : System::ServiceModel::ServiceHostBase
public class WorkflowServiceHost : System.ServiceModel.ServiceHostBase
[System.Obsolete("The WF3 types are deprecated.  Instead, please use the new WF4 types from System.Activities.*")]
public class WorkflowServiceHost : System.ServiceModel.ServiceHostBase
type WorkflowServiceHost = class
    inherit ServiceHostBase
[<System.Obsolete("The WF3 types are deprecated.  Instead, please use the new WF4 types from System.Activities.*")>]
type WorkflowServiceHost = class
    inherit ServiceHostBase
Public Class WorkflowServiceHost
Inherits ServiceHostBase
繼承
屬性

備註

Windows Communication Foundation (WCF) 服務模型程式設計模型,來執行主控制項所使用的主控制項。Implements the host used by the Windows Communication Foundation (WCF) service model programming model.

當您不使用網際網路資訊服務 (IIS) 或 Windows Activation Services (WAS) 來公開服務的時候,請使用 WorkflowServiceHost 類別,將工作流程做為服務加以設定和公開,以供用戶端應用程式使用。Use the WorkflowServiceHost class to configure and expose a workflow as service for use by client applications when you are not using Internet Information Services (IIS) or Windows Activation Services (WAS) to expose a service. IIS 和 WAS 都會代表您與 WorkflowServiceHost 物件進行互動。Both IIS and WAS interact with a WorkflowServiceHost object on your behalf.

若要將工作流程當做服務來公開以供呼叫端使用,WCF 必須有完整的服務描述 (由 ServiceDescription 類別表示)。To expose a workflow as service for use by callers, WCF requires a complete service description (represented by the ServiceDescription class). WorkflowServiceHost 類別會從工作流程服務類型及組態資訊建立 ServiceDescription,然後使用這個描述來為描述中的每個端點建立 ChannelDispatcher 物件。The WorkflowServiceHost class creates a ServiceDescription from the workflow service type and configuration information and then uses that description to create ChannelDispatcher objects for each endpoint in the description.

您可以使用 WorkflowServiceHost 物件,載入工作流程服務、設定端點、套用安全性設定及啟動接聽項處理傳入要求。Use a WorkflowServiceHost object to load a workflow service, configure endpoints, apply security settings, and start listeners to handle incoming requests.

建構函式

WorkflowServiceHost()

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

WorkflowServiceHost(Stream, Stream, ITypeProvider, Uri[])

使用包含工作流程定義之位元資料流、包含工作流程規則定義之位元資料流、自訂活動型別的型別提供者,以及指定的服務之基底位址,來初始化 WorkflowServiceHost 類別的新執行個體。Initializes a new instance of the WorkflowServiceHost class using a byte stream that contains the workflow definition, a byte stream that contains the workflow rules definition, a type provider for custom activity types, and the base addresses of the service specified.

WorkflowServiceHost(Stream, Stream, Uri[])

使用包含工作流程定義之位元資料流、包含工作流程規則定義之位元資料流,以及指定的服務之基底位址,來初始化 WorkflowServiceHost 類別的新執行個體。Initializes a new instance of the WorkflowServiceHost class using a byte stream that contains the workflow definition, a byte stream that contains the workflow rules definition, and the base addresses of the service specified.

WorkflowServiceHost(Stream, Uri[])

使用包含工作流程定義之位元資料流與指定的服務之基底位址,來初始化 WorkflowServiceHost 類別的新執行個體。Initializes a new instance of the WorkflowServiceHost class using a byte stream that contains the workflow definition and the base addresses of the service specified.

WorkflowServiceHost(String, String, ITypeProvider, Uri[])

使用工作流程定義的路徑、工作流程規則定義的路徑、自訂活動型別的型別提供者,以及指定的服務之基底位址,來初始化 WorkflowServiceHost 類別的新執行個體。Initializes a new instance of the WorkflowServiceHost class using a path to the workflow definition, a path to the workflow rules definition, a type provider for custom activity types, and the base addresses of the service specified.

WorkflowServiceHost(String, String, Uri[])

使用工作流程定義的路徑、工作流程規則定義的路徑,以及指定的服務之基底位址,來初始化 WorkflowServiceHost 類別的新執行個體。Initializes a new instance of the WorkflowServiceHost class using a path to the workflow definition, a path to the workflow rules definition, and the base addresses of the service specified.

WorkflowServiceHost(String, Uri[])

使用工作流程定義的路徑與指定服務的基底位址,來初始化 WorkflowServiceHost 類別的新執行個體。Initializes a new instance of the WorkflowServiceHost class using a path to the workflow definition and the base addresses of the service specified.

WorkflowServiceHost(Type, Uri[])

使用工作流程型別及指定的服務之基底位址,初始化 WorkflowServiceHost 類別的新執行個體。Initializes a new instance of the WorkflowServiceHost class using a workflow type and the base addresses of the service specified.

屬性

Authentication

取得服務驗證行為。Gets the service authentication behavior.

(繼承來源 ServiceHostBase)
Authorization

取得裝載之服務的授權行為。Gets the authorization behavior for the service hosted.

(繼承來源 ServiceHostBase)
BaseAddresses

取得裝載之服務使用的基底位址。Gets the base addresses used by the hosted service.

(繼承來源 ServiceHostBase)
ChannelDispatchers

取得服務主機使用的通道發送器集合。Gets the collection of channel dispatchers used by the service host.

(繼承來源 ServiceHostBase)
CloseTimeout

取得或設定允許服務主機關閉的時間間隔。Gets or sets the interval of time allowed for the service host to close.

(繼承來源 ServiceHostBase)
Credentials

取得裝載之服務的認證。Gets the credential for the service hosted.

(繼承來源 ServiceHostBase)
DefaultCloseTimeout

取得允許服務主機關閉的預設時間間隔。Gets the default interval of time allowed for the service host to close.

(繼承來源 ServiceHostBase)
DefaultOpenTimeout

取得允許服務主機開啟的預設時間間隔。Gets the default interval of time allowed for the service host to open.

(繼承來源 ServiceHostBase)
Description

取得裝載之服務的描述。Gets the description of the service hosted.

(繼承來源 ServiceHostBase)
Extensions

取得目前指定服務主機的延伸。Gets the extensions for the current specified service host.

(繼承來源 ServiceHostBase)
ImplementedContracts

擷取由裝載之服務實作的合約。Retrieves the contracts implemented by the service hosted.

(繼承來源 ServiceHostBase)
IsDisposed

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

(繼承來源 CommunicationObject)
ManualFlowControlLimit

取得或設定由裝載之服務接收的訊息流量控制限制。Gets or sets the flow control limit for messages received by the service hosted.

(繼承來源 ServiceHostBase)
OpenTimeout

取得或設定允許服務主機開啟的時間間隔。Gets or sets the interval of time allowed for the service host to open.

(繼承來源 ServiceHostBase)
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)
AddBaseAddress(Uri)

將基底位址新增至服務主機。Adds a base address to the service host.

(繼承來源 ServiceHostBase)
AddDefaultEndpoints()

針對在具有預設繫結的服務主機上找到的各個合約,為所有的基底位址加入服務端點。Adds service endpoints for all base addresses in each contract found in the service host with the default binding.

(繼承來源 ServiceHostBase)
AddServiceEndpoint(ServiceEndpoint)

將指定的服務端點加入至裝載的服務。Adds the specified service endpoint to the hosted service.

(繼承來源 ServiceHostBase)
AddServiceEndpoint(String, Binding, String)

使用指定的合約、繫結和端點位址,將服務端點加入至裝載的服務。Adds a service endpoint to the hosted service with a specified contract, binding, and endpoint address.

(繼承來源 ServiceHostBase)
AddServiceEndpoint(String, Binding, String, Uri)

使用指定的合約、繫結、端點位址,以及包含其接聽所在位址的 URI,將服務端點新增至裝載的服務。Adds a service endpoint to the hosted service with a specified contract, binding, endpoint address and URI that contains the address at which it listens.

(繼承來源 ServiceHostBase)
AddServiceEndpoint(String, Binding, Uri)

使用指定的合約、繫結以及含有端點位址的 URI,將服務端點新增至裝載的服務。Adds a service endpoint to the hosted service with a specified contract, binding, and a URI that contains the endpoint address.

(繼承來源 ServiceHostBase)
AddServiceEndpoint(String, Binding, Uri, Uri)

使用指定的合約、繫結以及含有端點與接聽位址的 URI,將服務端點新增至裝載的服務。Adds a service endpoint to the hosted service with the specified contract, binding, and URIs that contain the endpoint and listening addresses.

(繼承來源 ServiceHostBase)
AddServiceEndpoint(Type, Binding, String)

使用指定的合約、繫結和端點位址,新增工作流程服務的服務端點。Adds a service endpoint for the workflow service using the specified contract, binding, and endpoint address.

AddServiceEndpoint(Type, Binding, String, Uri)

使用指定的合約、繫結、端點位址以及服務所接聽的 URI,將服務端點新增至工作流程服務。Adds a service endpoint to the workflow service with a specified contract, a binding, an endpoint address, and a URI on which the service listens.

AddServiceEndpoint(Type, Binding, Uri)

使用指定的合約、繫結以及含有端點位址的 URI,將服務端點新增至工作流程服務。Adds a service endpoint to the workflow service with a specified contract, binding, and URI that contains the endpoint address.

AddServiceEndpoint(Type, Binding, Uri, Uri)

使用指定的合約、繫結、含有端點位址的 URI 以及服務所接聽的 URI,將服務端點新增至工作流程服務。Adds a service endpoint to the workflow service with a specified contract, a binding, a URI that contains the endpoint address, and a URI on which the service listens.

ApplyConfiguration()

從組態檔載入服務描述資訊,並將其套用至正在建構的執行階段。Loads the service description information from the configuration file and applies it to the runtime being constructed.

(繼承來源 ServiceHostBase)
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)
CreateDescription(IDictionary<String,ContractDescription>)

建立工作流程服務的說明。Creates a description of the workflow service.

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)
IncrementManualFlowControlLimit(Int32)

使用指定的增量,增加前往裝載之服務的訊息流量率限制。Increases the limit on the flow rate of messages to the hosted service by a specified increment.

(繼承來源 ServiceHostBase)
InitializeDescription(UriSchemeKeyedCollection)

使用合約和服務描述建立並初始化服務主機。Creates and initializes the service host with the contract and service descriptions.

(繼承來源 ServiceHostBase)
InitializeRuntime()

初始化服務主機的執行階段。Initializes the runtime for the service host.

(繼承來源 ServiceHostBase)
LoadConfigurationSection(ServiceElement)

從裝載之服務的組態檔載入服務項目。Loads the service element from the configuration file of the hosted service.

(繼承來源 ServiceHostBase)
MemberwiseClone()

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

(繼承來源 Object)
OnAbort()

中止服務。Aborts the service.

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

開始服務主機關閉時所叫用的非同步作業。Begins an asynchronous operation invoked on the close of the service host.

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

開始服務主機開啟時所叫用的非同步作業。Begins an asynchronous operation invoked on the opening of the service host.

(繼承來源 ServiceHostBase)
OnClose(TimeSpan)

關閉裝載的服務,包括其通道發送器以及相關執行個體內容和接聽程式。Closes down the hosted service, including their channel dispatchers and associated instance contexts and listeners.

(繼承來源 ServiceHostBase)
OnClosed()

釋放服務主機使用的資源。Releases resources used by the service host.

(繼承來源 ServiceHostBase)
OnClosing()

在將 WorkflowServiceHost 置入關閉狀態前,會呼叫此方法。This method is called before the WorkflowServiceHost is put into a closing state.

OnEndClose(IAsyncResult)

完成關閉服務主機時所叫用的非同步作業。Completes an asynchronous operation invoked on the closing of the service host.

(繼承來源 ServiceHostBase)
OnEndOpen(IAsyncResult)

完成開啟服務主機時所叫用的非同步作業。Completes an asynchronous operation invoked on the opening of the service host.

(繼承來源 ServiceHostBase)
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)

開啟通道發送器。Opens the channel dispatchers.

(繼承來源 ServiceHostBase)
OnOpened()

取得裝載之服務的服務認證、服務驗證及授權行為。Gets the service credentials,service authentication and authorization behavior for the hosted service.

(繼承來源 ServiceHostBase)
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)
ReleasePerformanceCounters()

釋放裝載之服務的服務和通道發送器效能計數器。Releases the service and channel dispatcher performance counters for the hosted service.

(繼承來源 ServiceHostBase)
SetEndpointAddress(ServiceEndpoint, String)

將指定之端點的端點位址設定為指定的位址。Sets the endpoint address of the specified endpoint to the specified address.

(繼承來源 ServiceHostBase)
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)
UnknownMessageReceived

發生於收到未知訊息時。Occurs when an unknown message is received.

(繼承來源 ServiceHostBase)

明確介面實作

IDisposable.Dispose()

關閉服務主機。Closes the service host.

(繼承來源 ServiceHostBase)

適用於