WorkflowApplication 类

定义

为工作流的单个实例提供宿主。Provides a host for a single instance of a workflow.

public ref class WorkflowApplication sealed : System::Activities::Hosting::WorkflowInstance
public sealed class WorkflowApplication : System.Activities.Hosting.WorkflowInstance
type WorkflowApplication = class
    inherit WorkflowInstance
Public NotInheritable Class WorkflowApplication
Inherits WorkflowInstance
继承
WorkflowApplication

示例

下面的示例使用 WorkflowApplication 承载一个工作流。The following example hosts a workflow using WorkflowApplication. 该示例使用指定的工作流定义构造 WorkflowApplication,处理所需的工作流生命周期事件,并通过调用 Run 来调用工作流。A WorkflowApplication instance is constructed using the specified workflow definition, the desired workflow lifecycle events are handled, and the workflow is invoked with a call to Run. 完成工作流时,会向控制台显示以下输出。When the workflow is completed, the following output is displayed to the console.

Starting the workflow.   
Workflow 593976e8-558d-4989-94d6-50a14b34fd7b Idle.   
Ending the workflow.   
Workflow 593976e8-558d-4989-94d6-50a14b34fd7b Completed  
Workflow 593976e8-558d-4989-94d6-50a14b34fd7b Unloaded.  
Activity wf = new Sequence
{
    Activities =
     {
         new WriteLine
         {
             Text = "Starting the workflow."
         },
         new Delay
         {
             Duration = TimeSpan.FromSeconds(5)
         },
         new WriteLine
         {
             Text = "Ending the workflow."
         }
     }
};

// Create a WorkflowApplication instance.
WorkflowApplication wfApp = new WorkflowApplication(wf);

// Subscribe to any desired workflow lifecycle events.
wfApp.Completed = delegate(WorkflowApplicationCompletedEventArgs e)
{
    if (e.CompletionState == ActivityInstanceState.Faulted)
    {
        Console.WriteLine("Workflow {0} Terminated.", e.InstanceId);
        Console.WriteLine("Exception: {0}\n{1}",
            e.TerminationException.GetType().FullName,
            e.TerminationException.Message);
    }
    else if (e.CompletionState == ActivityInstanceState.Canceled)
    {
        Console.WriteLine("Workflow {0} Canceled.", e.InstanceId);
    }
    else
    {
        Console.WriteLine("Workflow {0} Completed.", e.InstanceId);

        // Outputs can be retrieved from the Outputs dictionary,
        // keyed by argument name.
        // Console.WriteLine("The winner is {0}.", e.Outputs["Winner"]);
    }
};

wfApp.Aborted = delegate(WorkflowApplicationAbortedEventArgs e)
{
    // Display the exception that caused the workflow
    // to abort.
    Console.WriteLine("Workflow {0} Aborted.", e.InstanceId);
    Console.WriteLine("Exception: {0}\n{1}",
        e.Reason.GetType().FullName,
        e.Reason.Message);
};

wfApp.Idle = delegate(WorkflowApplicationIdleEventArgs e)
{
    // Perform any processing that should occur
    // when a workflow goes idle. If the workflow can persist,
    // both Idle and PersistableIdle are called in that order.
    Console.WriteLine("Workflow {0} Idle.", e.InstanceId);
};

wfApp.PersistableIdle = delegate(WorkflowApplicationIdleEventArgs e)
{
    // Instruct the runtime to persist and unload the workflow
    return PersistableIdleAction.Unload;
};

wfApp.Unloaded = delegate(WorkflowApplicationEventArgs e)
{
    Console.WriteLine("Workflow {0} Unloaded.", e.InstanceId);
};

wfApp.OnUnhandledException = delegate(WorkflowApplicationUnhandledExceptionEventArgs e)
{
    // Display the unhandled exception.
    Console.WriteLine("OnUnhandledException in Workflow {0}\n{1}",
        e.InstanceId, e.UnhandledException.Message);

    Console.WriteLine("ExceptionSource: {0} - {1}",
        e.ExceptionSource.DisplayName, e.ExceptionSourceInstanceId);

    // Instruct the runtime to terminate the workflow.
    // Other choices are Abort and Cancel
    return UnhandledExceptionAction.Terminate;
};

// Run the workflow.
wfApp.Run();

注解

WorkflowApplication 类为单个工作流实例提供宿主。The WorkflowApplication class provides a host for a single workflow instance. 它是由工作流运行时管理的实际工作流实例的代理。It is a proxy to the actual workflow instance that is managed by the workflow runtime. WorkflowApplication 的用户可以通过调用 WorkflowApplication 对象中的适当方法,指示工作流运行时在工作流实例上执行操作。Users of WorkflowApplication can instruct the workflow runtime to perform actions on a workflow instance by calling the appropriate methods on a WorkflowApplication object. 如果请求的操作无效,则引发异常。If a requested action is not valid, an exception is thrown.

使用 WorkflowApplication,可以执行以下任务:Using WorkflowApplication you can perform the following tasks:

  1. 创建新的工作流实例,或从实例存储区中加载工作流实例。Create a new workflow instance, or load a workflow instance from an instance store.

  2. 提供扩展以供工作流实例内的活动使用。Provide extensions to be used by activities within a workflow instance.

  3. 控制工作流实例的执行。Control the execution of a workflow instance.

  4. 恢复由工作流实例内的活动创建的书签。Resume a bookmark created by an activity within a workflow instance.

  5. 保留或卸载工作流实例。Persist or unload a workflow instance.

  6. 接收工作流实例生命周期事件通知。Be notified of workflow instance lifecycle events.

构造函数

WorkflowApplication(Activity)

使用指定的工作流定义创建 WorkflowApplication 类的新实例。Creates a new instance of the WorkflowApplication class with the specified workflow definition.

WorkflowApplication(Activity, IDictionary<String,Object>)

创建 WorkflowApplication 类的新实例,该实例使用指定的工作流定义和自变量值。Creates a new instance of the WorkflowApplication class that uses the specified workflow definition and argument values.

WorkflowApplication(Activity, IDictionary<String,Object>, WorkflowIdentity)

使用指定的工作流定义、参数值以及定义标识创建 WorkflowApplication 类的新实例。Creates a new instance of the WorkflowApplication class that uses the specified workflow definition and argument values, and definition identity.

WorkflowApplication(Activity, WorkflowIdentity)

使用指定的工作流定义和定义标识创建 WorkflowApplication 类的新实例。Creates a new instance of the WorkflowApplication class with the specified workflow definition and definition identity.

属性

Aborted

获取或设置中止工作流实例时调用的 Action<T>Gets or sets the Action<T> that is invoked when the workflow instance is aborted.

Completed

获取或设置工作流实例完成时调用的 Action<T>Gets or sets the Action<T> that is invoked when the workflow instance completes.

Controller

获取此 WorkflowInstance.WorkflowInstanceControlWorkflowInstance 实例。Gets the WorkflowInstance.WorkflowInstanceControl instance for this WorkflowInstance.

(继承自 WorkflowInstance)
DefinitionIdentity

获取或设置 WorkflowInstance 的定义标识。Gets or sets the definition identity of WorkflowInstance.

(继承自 WorkflowInstance)
Extensions

获取当前工作流实例的扩展的集合。Gets the collection of extensions for the current workflow instance.

HostEnvironment

获取或设置工作流实例的自变量和变量的根环境。Gets or sets the root environment for the workflow instance's arguments and variables.

(继承自 WorkflowInstance)
Id

获取当前工作流应用程序实例的 128 位 GUID 标识符。Gets the 128-bit GUID identifier of the current workflow application instance.

Idle

获取或设置当前工作流实例进入空闲状态时调用的 Action<T>Gets or sets the Action<T> that is invoked when the current workflow instance becomes idle.

InstanceStore

获取或设置一个对象,该对象提供对工作流应用程序的当前实例保留状态的访问。Gets or sets an object that provides access to the persisted state of the current instance of the workflow application.

IsReadOnly

获取一个值,该值指示工作流实例是否已初始化。Gets a value that indicates whether the workflow instance has been initialized.

(继承自 WorkflowInstance)
OnUnhandledException

获取或设置当前工作流实例遇到未处理的异常时调用的 Func<T,TResult>Gets or sets the Func<T,TResult> that is invoked when the current workflow instance encounters an unhandled exception.

PersistableIdle

获取或设置当前工作流实例处于空闲状态并可被保留时调用的代理。Gets or sets the delegate that is invoked when the current workflow instance is idle and can be persisted.

SupportsInstanceKeys

获取一个值,该值指示宿主是否支持 InstanceKeys 与运行时实例的关联。Gets a value that indicates whether the host supports the association of InstanceKeys with a run-time instance.

(继承自 WorkflowInstance)
SynchronizationContext

获取或设置用于调度工作流实例的 SynchronizationContextGets or sets the SynchronizationContext used for scheduling the workflow instance.

(继承自 WorkflowInstance)
Unloaded

获取或设置卸载当前工作流时调用的 Action<T>Gets or sets the Action<T> that is invoked when the current workflow unloads.

WorkflowDefinition

获取工作流实例的工作流定义。Gets the workflow definition of the workflow instance.

(继承自 WorkflowInstance)

方法

Abort()

通知工作流运行时应中止此工作流实例。Notifies the workflow runtime that this workflow instance should abort.

Abort(String)

通知工作流运行时由于特定原因应中止此工作流实例。Notifies the workflow runtime that this workflow instance should abort for the specified reason.

AddInitialInstanceValues(IDictionary<XName,Object>)

指定与新实例的首个保留内容一起包含的实例元数据值。Specifies instance metadata values that are included with the first persistence of a new instance.

BeginCancel(AsyncCallback, Object)

使用指定的 AsyncCallback 和用户提供的状态以异步方式取消工作流实例。Cancels a workflow instance asynchronously using the specified AsyncCallback and user-provided state.

BeginCancel(TimeSpan, AsyncCallback, Object)

使用指定的超时间隔、AsyncCallback 和用户提供的状态以异步方式取消工作流实例。Cancels a workflow instance asynchronously using the specified time-out interval, AsyncCallback, and user-provided state.

BeginCreateDefaultInstanceOwner(InstanceStore, WorkflowIdentity, WorkflowIdentityFilter, AsyncCallback, Object)

异步使用带指定实例存储、定义标识、标识筛选器、回拨和状态的 IAsyncResult 异步设计模型创建默认实例所有者。Creates a default instance owner asynchronously using the IAsyncResult asynchronous design pattern with specified instance store, definition identity, identity filter, callback and state.

BeginCreateDefaultInstanceOwner(InstanceStore, WorkflowIdentity, WorkflowIdentityFilter, TimeSpan, AsyncCallback, Object)

异步使用带指定实例存储、定义标识、标识筛选器、超时间隔、回拨和状态的 IAsyncResult 异步设计模型创建默认实例所有者。Creates a default instance owner asynchronously using the IAsyncResult asynchronous design pattern with specified instance store, definition identity, identity filter, timeout interval, callback and state.

BeginDeleteDefaultInstanceOwner(InstanceStore, AsyncCallback, Object)

异步使用带指定实例存储区、回调和状态的 IAsyncResult 异步设计模型检索可运行的实例所有者。Deletes a default instance owner asynchronously using the IAsyncResult asynchronous design pattern with specified instance store, callback, and state.

BeginDeleteDefaultInstanceOwner(InstanceStore, TimeSpan, AsyncCallback, Object)

异步使用带指定实例存储区、超时间隔、回调和状态的 IAsyncResult 异步设计模型删除默认实例的所有者。Deletes a default instance owner asynchronously using the IAsyncResult asynchronous design pattern with specified instance store, timeout interval, callback, and state.

BeginFlushTrackingRecords(TimeSpan, AsyncCallback, Object)

由工作流运行时调用,用于开始将挂起的跟踪记录以异步方式发送给跟踪参与者。Called by the workflow runtime to begin sending pending tracking records to tracking participants asynchronously.

(继承自 WorkflowInstance)
BeginGetInstance(Guid, InstanceStore, AsyncCallback, Object)

使用带指定的实例标识符、实例存储区、回调和状态的 IAsyncResult 异步设计模式异步检索实例所有者。Retrieves an instance owner asynchronously using the IAsyncResult asynchronous design pattern with specified instance identifier, instance store, callback, and state.

BeginGetInstance(Guid, InstanceStore, TimeSpan, AsyncCallback, Object)

使用带指定的实例标识符、实例存储区、超时间隔、回调和状态的 IAsyncResult 异步设计模式异步检索实例所有者。Retrieves an instance owner asynchronously using the IAsyncResult asynchronous design pattern with specified instance identifier, instance store, timeout interval, callback, and state.

BeginGetRunnableInstance(InstanceStore, AsyncCallback, Object)

异步使用带指定实例存储区、回调和状态的 IAsyncResult 异步设计模型检索可运行的实例所有者。Retrieves a runnable instance owner asynchronously using the IAsyncResult asynchronous design pattern with specified instance store, callback, and state.

BeginGetRunnableInstance(InstanceStore, TimeSpan, AsyncCallback, Object)

异步使用带指定实例存储区、超时间隔、回调和状态的 IAsyncResult 异步设计模型检索可运行的实例所有者。Retrieves a runnable instance owner asynchronously using the IAsyncResult asynchronous design pattern with specified instance store, timeout interval, callback, and state.

BeginLoad(Guid, AsyncCallback, Object)

使用指定的实例标识符、回调方法和用户提供的状态以异步方式从实例存储区中加载工作流。Loads a workflow asynchronously from an instance store using the specified instance identifier, callback method, and user-provided state.

BeginLoad(Guid, TimeSpan, AsyncCallback, Object)

使用指定的实例标识符、超时期限、回调方法和用户提供的状态以异步方式从实例存储区中加载工作流。Loads a workflow asynchronously from an instance store using the specified instance identifier, timeout period, callback method, and user-provided state.

BeginLoad(WorkflowApplicationInstance, AsyncCallback, Object)

使用带指定实例、回调和状态的 IAsyncResult 异步设计模型从实例存储区中异步加载工作流。Loads a workflow asynchronously from an instance store using the IAsyncResult asynchronous design pattern with specified instance, callback and state.

BeginLoad(WorkflowApplicationInstance, DynamicUpdateMap, AsyncCallback, Object)

使用带指定实例、更新映射、回调和状态的 IAsyncResult 异步设计模型从实例存储区中异步加载工作流。Loads a workflow asynchronously from an instance store using the IAsyncResult asynchronous design pattern with specified instance, update map, callback and state.

BeginLoad(WorkflowApplicationInstance, DynamicUpdateMap, TimeSpan, AsyncCallback, Object)

使用带指定实例、更新映射、超时间隔、回调和状态的 IAsyncResult 异步设计模型从实例存储区中异步加载工作流。Loads a workflow asynchronously from an instance store using the IAsyncResult asynchronous design pattern with specified instance, update map, timeout interval, callback and state.

BeginLoad(WorkflowApplicationInstance, TimeSpan, AsyncCallback, Object)

使用带指定实例、超时间隔、回调和状态的 IAsyncResult 异步设计模型从实例存储区中异步加载工作流。Loads a workflow asynchronously from an instance store using the IAsyncResult asynchronous design pattern with specified instance, timeout interval, callback and state.

BeginLoadRunnableInstance(AsyncCallback, Object)

启动一项操作,从 InstanceStore 中加载可运行工作流实例。Initiates an operation to load a runnable workflow instance from the InstanceStore.

BeginLoadRunnableInstance(TimeSpan, AsyncCallback, Object)

使用指定的超时间隔启动操作,以从 InstanceStore 加载可运行的工作流实例。Initiates an operation to load a runnable workflow instance from the InstanceStore using the specified time-out interval.

BeginPersist(AsyncCallback, Object)

使用指定的回调方法和用户提供的状态将工作流实例以异步方式保留到实例存储区中。Persists a workflow instance to an instance store asynchronously using the specified callback method and user-provided state.

BeginPersist(TimeSpan, AsyncCallback, Object)

使用指定的超时间隔、回调方法和用户提供的状态将工作流实例以异步方式保留到实例存储区中。Persists a workflow instance to an instance store asynchronously using the specified time-out interval, callback method, and user-provided state.

BeginResumeBookmark(Bookmark, Object, AsyncCallback, Object)

使用指定的值、回调方法和状态启动操作以恢复书签。Initiates an operation to resume a bookmark using the specified value, callback method, and state.

BeginResumeBookmark(Bookmark, Object, TimeSpan, AsyncCallback, Object)

使用指定的值、超时间隔、回调方法和状态启动操作以恢复书签。Initiates an operation to resume a bookmark using the specified value, time-out interval, callback method, and state.

BeginResumeBookmark(String, Object, AsyncCallback, Object)

使用指定的值、回调方法和状态启动异步操作以恢复具有指定名称的书签。Initiates an asynchronous operation to resume the bookmark with the specified name, using the specified value, callback method, and state. 要恢复的书签是此前由工作流实例内的活动创建的。The bookmark to be resumed is previously created by an activity within the workflow instance.

BeginResumeBookmark(String, Object, TimeSpan, AsyncCallback, Object)

使用指定的值、超时间隔、回调方法和状态启动异步操作以恢复具有指定名称的书签。Initiates an asynchronous operation to resume the bookmark with the specified name, using the specified value, time-out interval, callback method, and state. 要恢复的书签是此前由工作流实例内的活动创建的。The bookmark to be resumed is previously created by an activity within the workflow instance.

BeginRun(AsyncCallback, Object)

使用指定的回调方法和用户提供的状态以异步方式启动或恢复工作流实例。Starts or resumes a workflow instance asynchronously using the specified callback method and user-provided state.

BeginRun(TimeSpan, AsyncCallback, Object)

使用指定的超时间隔、回调方法和用户提供的状态以异步方式启动或恢复工作流实例。Starts or resumes a workflow instance asynchronously using the specified time-out interval, callback method, and user-provided state.

BeginTerminate(Exception, AsyncCallback, Object)

使用指定的异常、回调方法和用户提供的状态以异步方式终止工作流实例。Terminates a workflow instance asynchronously using the specified exception, callback method, and user-provided state.

BeginTerminate(Exception, TimeSpan, AsyncCallback, Object)

使用指定的异常、超时间隔、回调方法和用户提供的状态以异步方式终止工作流实例。Terminates a workflow instance asynchronously using the specified exception, time-out interval, callback method, and user-provided state.

BeginTerminate(String, AsyncCallback, Object)

使用指定的错误消息、回调方法和用户提供的状态以异步方式终止工作流实例。Terminates a workflow instance asynchronously using the specified error message, callback method, and user-provided state.

BeginTerminate(String, TimeSpan, AsyncCallback, Object)

使用指定的错误消息、超时间隔、回调方法和用户提供的状态以异步方式终止工作流实例。Terminates a workflow instance asynchronously using the specified error message, time-out interval, callback method, and user-provided state.

BeginUnload(AsyncCallback, Object)

使用指定的回调方法和用户提供的状态以异步方式保留和释放工作流实例。Persists and disposes a workflow instance asynchronously using the specified callback method and user-provided state.

BeginUnload(TimeSpan, AsyncCallback, Object)

使用指定的超时间隔、回调方法和用户提供的状态以异步方式保留和释放工作流实例。Persists and disposes a workflow instance asynchronously using the specified time-out interval, callback method, and user-provided state.

Cancel()

取消工作流实例。Cancels the workflow instance.

Cancel(TimeSpan)

使用指定的超时间隔取消工作流实例。Cancels the workflow instance using the specified time-out interval.

CreateDefaultInstanceOwner(InstanceStore, WorkflowIdentity, WorkflowIdentityFilter)

使用指定实例存储、定义标识和标识筛选器和超时间隔,创建工作流的默认实例所有者。Creates a default instance owner for the workflow using specified instance store, definition identity, and identity filter.

CreateDefaultInstanceOwner(InstanceStore, WorkflowIdentity, WorkflowIdentityFilter, TimeSpan)

使用指定实例存储、定义标识和标识筛选器和超时间隔,创建工作流的默认实例所有者。Creates a default instance owner for the workflow using specified instance store, definition identity, and identity filter and timeout interval.

DeleteDefaultInstanceOwner(InstanceStore)

使用指定的实例存储区和检索工作流的可运行实例。Deletes a default instance owner for the workflow with specified instance store.

DeleteDefaultInstanceOwner(InstanceStore, TimeSpan)

使用指定的实例存储区和超时间隔检索工作流的可运行实例。Deletes a default instance owner for the workflow with specified instance store and timeout interval.

DisposeExtensions()

对实现 Dispose() 的所有扩展调用 IDisposableCalls Dispose() on all extensions that implement IDisposable.

(继承自 WorkflowInstance)
EndCancel(IAsyncResult)

等待挂起的异步取消操作完成。Waits for the pending asynchronous cancel operation to complete.

EndCreateDefaultInstanceOwner(IAsyncResult)

等待完成对默认实例所有者的创建。Waits for the creation of default instance owner to complete.

EndDeleteDefaultInstanceOwner(IAsyncResult)

等待完成对默认实例所有者的删除。Waits for the deletion of default instance owner to complete.

EndFlushTrackingRecords(IAsyncResult)

由工作流运行时调用,用于结束跟踪操作。Called by the workflow runtime to end the track operation.

(继承自 WorkflowInstance)
EndGetInstance(IAsyncResult)

等待完成实例检索。Waits for the instance retrieval to complete.

EndGetRunnableInstance(IAsyncResult)

等待异步检索可运行实例操作完成。Waits for the asynchronous retrieval of runnable instance operation to complete.

EndLoad(IAsyncResult)

等待挂起的异步加载操作完成。Waits for the pending asynchronous load operation to complete.

EndLoadRunnableInstance(IAsyncResult)

等待异步加载可运行实例操作完成。Waits for the asynchronous load runnable instance operation to complete.

EndPersist(IAsyncResult)

等待挂起的异步保留操作完成。Waits for the pending asynchronous persist operation to complete.

EndResumeBookmark(IAsyncResult)

等待书签恢复操作完成。Waits for a bookmark resume operation to complete.

EndRun(IAsyncResult)

等待挂起的异步运行操作完成。Waits for the pending asynchronous run operation to complete.

EndTerminate(IAsyncResult)

等待挂起的异步终止操作完成。Waits for the pending asynchronous terminate operation to complete.

EndUnload(IAsyncResult)

等待挂起的异步卸载操作完成。Waits for the pending asynchronous unload operation to complete.

Equals(Object)

确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
FlushTrackingRecords(TimeSpan)

由工作流运行时调用,用于将挂起的跟踪记录发送给跟踪参与者。Called by the workflow runtime to send pending tracking records to tracking participants.

(继承自 WorkflowInstance)
GetBookmarks()

返回工作流实例的书签的集合。Returns the collection of bookmarks for the workflow instance.

GetBookmarks(TimeSpan)

使用指定的超时间隔返回工作流实例的书签的集合。Returns the collection of bookmarks for the workflow instance using the specified time-out interval.

GetExtension<T>()

返回指定类型的扩展。Returns an extension of the specified type.

(继承自 WorkflowInstance)
GetExtensions<T>()

返回针对指定类型找到的所有扩展。Returns all extensions found for the specified type.

(继承自 WorkflowInstance)
GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetInstance(Guid, InstanceStore)

使用指定的实例标识符和实例存储区检索工作流实例。Retrieves the workflow instance using specified instance identifier and instance store.

GetInstance(Guid, InstanceStore, TimeSpan)

使用指定的实例标识符、实例存储区和超时间隔检索工作流实例。Retrieves the workflow instance using specified instance identifier, instance store and timeout interval.

GetRunnableInstance(InstanceStore)

使用指定的实例存储区检索工作流的可运行实例。Retrieves the runnable instance of the workflow with specified instance store.

GetRunnableInstance(InstanceStore, TimeSpan)

使用指定的实例存储区和超时间隔检索工作流的可运行实例。Retrieves the runnable instance of the workflow with specified instance store and timeout interval.

GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
Initialize(IDictionary<String,Object>, IList<Handle>)

由主机调用,用于使用自变量值和执行属性初始化工作流实例。Called by the host to initialize the workflow instance with the argument values and execution properties.

(继承自 WorkflowInstance)
Initialize(Object)

由宿主调用,用于使用工作流运行时状态初始化工作流实例。Called by the host to initialize the workflow instance with the workflow run-time state.

(继承自 WorkflowInstance)
Initialize(Object, DynamicUpdateMap)

由宿主调用,用于使用工作流运行时状态和更新映射初始化工作流实例。Called by the host to initialize the workflow instance with the workflow run-time state and update map.

(继承自 WorkflowInstance)
Load(Guid)

将指定的工作流实例从实例存储区加载到内存中。Loads the specified workflow instance into memory from an instance store.

Load(Guid, TimeSpan)

使用指定的超时间隔将指定的工作流实例从实例存储区加载到内存中。Loads the specified workflow instance into memory from an instance store using the specified time-out interval.

Load(WorkflowApplicationInstance)

从带指定实例的实例存储区加载工作流实例。Loads a workflow instance from an instance store with specified instance.

Load(WorkflowApplicationInstance, DynamicUpdateMap)

从带指定实例和更新映射的实例存储区加载工作流实例。Loads a workflow instance from an instance store with specified instance and update map.

Load(WorkflowApplicationInstance, DynamicUpdateMap, TimeSpan)

从带指定实例、更新映射和超时间隔的实例存储区加载工作流实例。Loads a workflow instance from an instance store with specified instance, update map and timeout interval.

Load(WorkflowApplicationInstance, TimeSpan)

从带指定实例和超时间隔的实例存储区加载工作流实例。Loads a workflow instance from an instance store with specified instance and timeout interval.

LoadRunnableInstance()

InstanceStore 加载可运行的工作流实例。Loads a runnable workflow instance from the InstanceStore.

LoadRunnableInstance(TimeSpan)

使用指定的超时间隔从 InstanceStore 加载可运行的工作流实例。Loads a runnable workflow instance from the InstanceStore using the specified time-out interval.

MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
OnBeginAssociateKeys(ICollection<InstanceKey>, AsyncCallback, Object)

由工作流运行时调用,用于通知宿主新的实例键应与此实例关联。Called by the workflow runtime to notify the host that new instance keys should be associated with this instance.

(继承自 WorkflowInstance)
OnBeginFlushTrackingRecords(AsyncCallback, Object)

异步调用,用于要求主机针对跟踪参与者刷新挂起的跟踪记录。Asynchronous call to ask host to flush pending tracking records to tracking participants.

(继承自 WorkflowInstance)
OnBeginPersist(AsyncCallback, Object)

要求宿主保留工作流的异步调用。Asynchronous call to ask the host to persist the workflow.

(继承自 WorkflowInstance)
OnBeginResumeBookmark(Bookmark, Object, TimeSpan, AsyncCallback, Object)

由工作流运行时调用,用于通知宿主恢复书签操作已开始。Called by the workflow runtime to notify the host that a resume bookmark operation is beginning.

(继承自 WorkflowInstance)
OnDisassociateKeys(ICollection<InstanceKey>)

由工作流运行时调用,用于通知宿主某些实例键集不应再与此实例关联。Called by the workflow runtime to notify the host that a certain set of instance keys should no longer be associated with this instance.

(继承自 WorkflowInstance)
OnEndAssociateKeys(IAsyncResult)

由工作流运行时调用,用于通知宿主关联键操作已完成。Called by the workflow runtime to notify the host that an associate keys operation is complete.

(继承自 WorkflowInstance)
OnEndFlushTrackingRecords(IAsyncResult)

由工作流运行时调用,用于在刷新跟踪记录操作完成时通知宿主。Called by the workflow runtime to notify the host when the flush tracking records operation is complete.

(继承自 WorkflowInstance)
OnEndPersist(IAsyncResult)

由工作流运行时调用,用于通知宿主保留操作已完成。Called by the workflow runtime to notify the host that a persist operation is complete.

(继承自 WorkflowInstance)
OnEndResumeBookmark(IAsyncResult)

由工作流运行时调用,用于通知宿主恢复书签操作已完成。Called by the workflow runtime to notify the host that a resume bookmark operation is complete.

(继承自 WorkflowInstance)
OnNotifyPaused()

由工作流运行时调用,用于通知宿主工作流已从“正在运行”状态转换为“已暂停”状态。Called by the workflow runtime to notify the host that the workflow instance has transitioned from the running state to the paused state.

(继承自 WorkflowInstance)
OnNotifyUnhandledException(Exception, Activity, String)

由工作流运行时调用,用于通知宿主工作流实例中发生了未经处理的异常。Called by the workflow runtime to notify the host an unhandled exception has occurred in the workflow instance.

(继承自 WorkflowInstance)
OnRequestAbort(Exception)

由工作流运行时调用,用于通知宿主已请求对工作流实例进行中止操作。Called by the workflow runtime to notify the host that an abort operation has been requested for the workflow instance.

(继承自 WorkflowInstance)
Persist()

将工作流实例保留到实例存储区。Persists a workflow instance to an instance store.

Persist(TimeSpan)

使用指定的超时间隔将工作流实例保留到实例存储区。Persists a workflow instance to an instance store using the specified time-out interval.

RegisterExtensionManager(WorkflowInstanceExtensionManager)

由主机调用,用于注册指定的扩展管理器、验证所有必需的扩展是否存在,以及初始化要使用的扩展的集合。Called by the host to register the specified extension manager, validate that all required extensions are present, and to initialize the collection of extensions to be used.

(继承自 WorkflowInstance)
ResumeBookmark(Bookmark, Object)

使用指定的值启动操作以恢复指定的书签。Initiates an operation to resume the specified bookmark, using the specified value. 要恢复的书签是此前由工作流实例内的活动创建的。The bookmark to be resumed is previously created by an activity within the workflow instance.

ResumeBookmark(Bookmark, Object, TimeSpan)

使用指定的值和超时间隔启动操作以恢复指定的书签。Initiates an operation to resume the specified bookmark, using the specified value and time-out interval. 要恢复的书签是此前由工作流实例内的活动创建的。The bookmark to be resumed is previously created by an activity within the workflow instance.

ResumeBookmark(String, Object)

使用指定的值启动操作以恢复具有指定名称的书签。Initiates an operation to resume the bookmark with the specified name, using the specified value. 要恢复的书签是此前由工作流实例内的活动创建的。The bookmark to be resumed is previously created by an activity within the workflow instance.

ResumeBookmark(String, Object, TimeSpan)

使用指定的值和超时间隔启动操作以恢复具有指定名称的书签。Initiates an operation to resume the bookmark with the specified name, using the specified value and time-out interval. 要恢复的书签是此前由工作流实例内的活动创建的。The bookmark to be resumed is previously created by an activity within the workflow instance.

Run()

开始或恢复执行工作流实例。Begins or resumes the execution of a workflow instance.

Run(TimeSpan)

使用指定的超时间隔开始或恢复执行工作流实例。Begins or resumes the execution of a workflow instance using the specified time-out interval.

Terminate(Exception)

使用指定的异常终止工作流实例。Terminates a workflow instance using the specified exception.

Terminate(Exception, TimeSpan)

使用指定的异常和超时间隔终止工作流实例。Terminates a workflow instance using the specified exception and time-out interval.

Terminate(String)

使用指定的错误消息终止工作流实例。Terminates a workflow instance using the specified error message.

Terminate(String, TimeSpan)

使用指定的错误消息和超时间隔终止工作流实例。Terminates a workflow instance using the specified error message and time-out interval.

ThrowIfReadOnly()

如果工作流实例已初始化,则引发 InvalidOperationException(由 IsReadOnly 确定)。Throws an InvalidOperationException if the workflow instance has been initialized, as determined by IsReadOnly.

(继承自 WorkflowInstance)
ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)
Unload()

保留或卸载工作流实例。Persists and unloads a workflow instance.

Unload(TimeSpan)

使用指定的超时间隔保留和卸载工作流实例。Persists and unloads a workflow instance using the specified time-out interval.

适用于