संपादित करें

इसके माध्यम से साझा किया गया


WorkflowApplication.BeginUnload Method

Definition

Persists and disposes a workflow instance asynchronously using the IAsyncResult asynchronous design pattern.

Overloads

BeginUnload(TimeSpan, AsyncCallback, Object)

Persists and disposes a workflow instance asynchronously using the specified 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.

Remarks

For more information, see Asynchronous Programming Overview.

If the workflow instance was previously loaded from persistence, then the same InstanceStore used to load the workflow is used for persistence. If the workflow was created and has not yet been persisted, then an InstanceStore must be configured before calling this method or else an InvalidOperationException is thrown when this method is called.

BeginUnload(TimeSpan, AsyncCallback, Object)

Persists and disposes a workflow instance asynchronously using the specified time-out interval, callback method, and user-provided state.

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

Parameters

timeout
TimeSpan

The interval in which the BeginTerminate operation must complete before the operation is canceled and a TimeoutException is thrown.

callback
AsyncCallback

The method to be called when the BeginUnload operation has completed.

state
Object

An optional application-specific object that contains information about the asynchronous operation.

Returns

A reference to the asynchronous BeginUnload operation.

Remarks

To determine whether the BeginUnload operation was successful, call EndUnload. EndUnload can be called from inside or outside of the method reference in the callback parameter. If EndUnload is called before the BeginUnload operation completes, it blocks until the BeginUnload operation completes. If the BeginUnload operation does not complete within the specified time-out interval a TimeoutException is thrown from EndUnload.

If the workflow instance was previously loaded from persistence, then the same InstanceStore used to load the workflow is used for persistence. If the workflow was created and has not yet been persisted, then an InstanceStore must be configured before calling this method or else an InvalidOperationException is thrown when this method is called.

This method persists and unloads a workflow instance asynchronously using the IAsyncResult asynchronous design pattern. For more information, see Asynchronous Programming Overview.

Applies to

BeginUnload(AsyncCallback, Object)

Persists and disposes a workflow instance asynchronously using the specified callback method and user-provided state.

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

Parameters

callback
AsyncCallback

The method to be called when the BeginUnload operation has completed.

state
Object

An optional application-specific object that contains information about the asynchronous operation.

Returns

A reference to the asynchronous BeginUnload operation.

Remarks

To determine whether the BeginUnload operation was successful, call EndUnload. EndUnload can be called from inside or outside of the method reference in the callback parameter. If EndUnload is called before the BeginUnload operation completes, it blocks until the BeginUnload operation completes. By default, the BeginUnload operation must complete in 30 seconds or a TimeoutException is thrown from EndUnload.

If the workflow instance was previously loaded from persistence, then the same InstanceStore used to load the workflow is used for persistence. If the workflow was created and has not yet been persisted, then an InstanceStore must be configured before calling this method or else an InvalidOperationException is thrown when this method is called.

This method persists and disposes a workflow instance asynchronously using the IAsyncResult asynchronous design pattern. For more information, see Asynchronous Programming Overview.

Applies to