WorkflowApplication.BeginLoadRunnableInstance 方法

定义

启动从 InstanceStore 中加载可运行工作流实例的异步进程。Initiates the asynchronous process of loading 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.

BeginLoadRunnableInstance(AsyncCallback, Object)

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

注解

可运行实例是指计时器或实例锁已过期的实例。A runnable instance is an instance for which a timer or instance lock has expired.

BeginLoadRunnableInstance(TimeSpan, AsyncCallback, Object)

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

public:
 IAsyncResult ^ BeginLoadRunnableInstance(TimeSpan timeout, AsyncCallback ^ callback, System::Object ^ state);
public IAsyncResult BeginLoadRunnableInstance (TimeSpan timeout, AsyncCallback callback, object state);
member this.BeginLoadRunnableInstance : TimeSpan * AsyncCallback * obj -> IAsyncResult
Public Function BeginLoadRunnableInstance (timeout As TimeSpan, callback As AsyncCallback, state As Object) As IAsyncResult

参数

timeout
TimeSpan

必须在此时间内完成加载操作的时间间隔,否则,将取消该操作并引发 TimeoutExceptionThe interval in which the load operation must complete before the operation is canceled and a TimeoutException is thrown.

callback
AsyncCallback

操作完成后要调用的方法。The method to be called when the operation is complete.

state
Object

一个特定于应用程序的可选对象,其中包含有关异步操作的信息。An optional application-specific object containing information about the asynchronous operation.

返回

IAsyncResult

对异步操作的引用A reference to the asynchronous operation

注解

可运行实例是指计时器或实例锁已过期的实例。A runnable instance is an instance for which a timer or instance lock has expired.

若要确定加载操作是否成功,请调用 EndLoadRunnableInstanceTo determine if the load operation was successful, call EndLoadRunnableInstance. 可以从 EndLoadRunnableInstance 方法的内部或外部调用 callbackEndLoadRunnableInstance can be called from inside or outside of the callback method. 如果在恢复操作完成前调用 EndLoadRunnableInstance,则此调用将会被阻止,直至恢复操作完成。If EndLoadRunnableInstance is called before the resume operation completes, it blocks until the resume operation completes. 如果加载操作未在指定的超时间隔内完成,则将在 TimeoutException 中引发 EndLoadRunnableInstanceIf the load operation does not complete within the specified time-out interval a TimeoutException is thrown from EndLoadRunnableInstance.

此方法使用 IAsyncResult 异步设计模式以异步方式加载工作流。This method loads a workflow asynchronously using the IAsyncResult asynchronous design pattern. 有关详细信息,请参阅 异步编程概述For more information, see Asynchronous Programming Overview.

适用于

BeginLoadRunnableInstance(AsyncCallback, Object)

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

public:
 IAsyncResult ^ BeginLoadRunnableInstance(AsyncCallback ^ callback, System::Object ^ state);
public IAsyncResult BeginLoadRunnableInstance (AsyncCallback callback, object state);
member this.BeginLoadRunnableInstance : AsyncCallback * obj -> IAsyncResult
Public Function BeginLoadRunnableInstance (callback As AsyncCallback, state As Object) As IAsyncResult

参数

callback
AsyncCallback

操作完成后要调用的方法。The method to be called when the operation is complete.

state
Object

一个特定于应用程序的可选对象,其中包含有关异步操作的信息。An optional application-specific object containing information about the asynchronous operation.

返回

IAsyncResult

对异步操作的引用A reference to the asynchronous operation

注解

可运行实例是指计时器或实例锁已过期的实例。A runnable instance is an instance for which a timer or instance lock has expired.

若要确定加载操作是否成功,请调用 EndLoadRunnableInstanceTo determine if the load operation was successful, call EndLoadRunnableInstance. 可以从 EndLoadRunnableInstance 方法的内部或外部调用 callbackEndLoadRunnableInstance can be called from inside or outside of the callback method. 如果在恢复操作完成前调用 EndLoadRunnableInstance,则此调用将会被阻止,直至恢复操作完成。If EndLoadRunnableInstance is called before the resume operation completes, it blocks until the resume operation completes. 默认情况下,恢复操作必须在 30 秒内完成,否则将在 TimeoutException 中引发 EndLoadRunnableInstanceBy default, the resume operation must complete in 30 seconds or else a TimeoutException is thrown from EndLoadRunnableInstance.

此方法使用 IAsyncResult 异步设计模式以异步方式加载工作流。This method loads a workflow asynchronously using the IAsyncResult asynchronous design pattern. 有关详细信息,请参阅 异步编程概述For more information, see Asynchronous Programming Overview.

适用于