Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

PersistenceProvider::BeginLoadIfChanged Method (TimeSpan, Object^, AsyncCallback^, Object^)

 

When implemented in a derived class, represents the beginning of the LoadIfChanged phase. The LoadIfChanged phase occurs when state data is loaded into the persistence provider from the persistence store, and the state data in the persistence store has been changed.

Namespace:   System.ServiceModel.Persistence
Assembly:  System.WorkflowServices (in System.WorkflowServices.dll)

public:
virtual IAsyncResult^ BeginLoadIfChanged(
	TimeSpan timeout,
	Object^ instanceToken,
	AsyncCallback^ callback,
	Object^ state
)

Parameters

timeout
Type: System::TimeSpan

The time period after which the persistence provider aborts this attempt.

instanceToken
Type: System::Object^

The token returned by a previous Create or Update that represents the current state held by the caller.

callback
Type: System::AsyncCallback^

The method to be called when the operation is completed.

state
Type: System::Object^

A user-provided object that distinguishes this particular asynchronous operation from other operations.

Return Value

Type: System::IAsyncResult^

The state of the BeginLoadIfChanged asynchronous method call.

The following code demonstrates how to implement the BeginLoadIfChanged method.

public override IAsyncResult BeginLoadIfChanged(TimeSpan timeout, object instanceToken, AsyncCallback callback, object state)
{
    base.ThrowIfDisposedOrNotOpen();
    return this.factory.BeginLoad(this.Id, timeout, callback, state);
}

.NET Framework
Available since 3.5
Return to top
Show:
© 2017 Microsoft