ActivityExecutionContext ActivityExecutionContext ActivityExecutionContext ActivityExecutionContext Class

定義

警告

此 API 現已淘汰。

表示 Activity 的執行環境。Represents the execution environment of an Activity. 這個類別無法被繼承。This class cannot be inherited.

public ref class ActivityExecutionContext sealed : IDisposable, IServiceProvider
[System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")]
public sealed class ActivityExecutionContext : IDisposable, IServiceProvider
type ActivityExecutionContext = class
    interface IServiceProvider
    interface IDisposable
Public NotInheritable Class ActivityExecutionContext
Implements IDisposable, IServiceProvider
繼承
ActivityExecutionContextActivityExecutionContextActivityExecutionContextActivityExecutionContext
屬性
實作

備註

注意

此資料討論已被汰換的類型及命名空間。This material discusses types and namespaces that are obsolete. 如需詳細資訊,請參閱 Windows Workflow Foundation 4.5 中即將淘汰的類型For more information, see Deprecated Types in Windows Workflow Foundation 4.5.

表示 Activity 的執行環境。Represents the execution environment of an Activity. 這個類別會選擇性地向個別活動公開工作流程執行階段能力和服務。This class selectively exposes workflow runtime capabilities and services to individual activities. 這個類別無法被繼承。This class cannot be inherited.

如需詳細資訊,請參閱 < 了解的活動執行內容For more information, see Understanding the Activity Execution Context.

欄位

CurrentExceptionProperty CurrentExceptionProperty CurrentExceptionProperty CurrentExceptionProperty

表示在執行工作流程執行個體期間發生的例外狀況。Represents an exception that has occurred during the execution of the workflow instance. 這個屬性只有在活動為失敗狀態時才有值。This property has a value only when an activity is in the faulting state.

屬性

Activity Activity Activity Activity

取得目前在此執行內容中執行的 ActivityGets the Activity that currently executes within this execution context.

ContextGuid ContextGuid ContextGuid ContextGuid

取得相關聯 ContextIDActivityGets the ContextID of the associated Activity.

ExecutionContextManager ExecutionContextManager ExecutionContextManager ExecutionContextManager

取得與這個執行個體相關聯的 ActivityExecutionContextManagerGets the ActivityExecutionContextManager associated with this instance.

方法

CancelActivity(Activity) CancelActivity(Activity) CancelActivity(Activity) CancelActivity(Activity)

由複合活動呼叫,以排程子活動的取消。Called by a composite activity to schedule the cancellation of a child activity. 工作流程執行階段不允許取消不是 Executing 狀態的子活動。The workflow runtime disallows cancellation of a child activity that is not in the Executing state.

CloseActivity() CloseActivity() CloseActivity() CloseActivity()

指出目前執行活動的工作流程執行階段應轉換為 Closed 狀態。Indicates to the workflow runtime that the currently executing activity should transition to the Closed state.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

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

(Inherited from Object)
ExecuteActivity(Activity) ExecuteActivity(Activity) ExecuteActivity(Activity) ExecuteActivity(Activity)

由複合活動呼叫,以排程子活動的執行。Called by a composite activity to schedule the execution of a child activity. 工作流程執行階段不允許執行不是初始化狀態的子活動。The workflow runtime disallows execution of a child activity that is not in the initialized state.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

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

(Inherited from Object)
GetService(Type) GetService(Type) GetService(Type) GetService(Type)

傳回指定之型別的服務。Returns a service of the specified type.

GetService<T>() GetService<T>() GetService<T>() GetService<T>()

傳回指定之 Type 的服務提供者。Returns a service provider of the specified Type.

GetType() GetType() GetType() GetType()

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

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

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

(Inherited from Object)
TrackData(Object) TrackData(Object) TrackData(Object) TrackData(Object)

叫用相關聯之 Activity 的追蹤方法。Invokes the track method for the associated Activity.

TrackData(String, Object) TrackData(String, Object) TrackData(String, Object) TrackData(String, Object)

叫用相關聯之 Activity 的追蹤方法。Invokes the track method for the associated Activity.

明確介面實作

IDisposable.Dispose() IDisposable.Dispose() IDisposable.Dispose() IDisposable.Dispose()

釋放 ActivityExecutionContext 所使用的所有資源。Releases all resources used by the ActivityExecutionContext.

適用於