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::EndLoadIfChanged Method (IAsyncResult^, Object^%)

 

When implemented in a derived class, represents the end 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 bool EndLoadIfChanged(
	IAsyncResult^ result,
	[OutAttribute] Object^% instance
)

Parameters

result
Type: System::IAsyncResult^

A reference to the result of the operation.

instance
Type: System::Object^%

The actual instance state.

Return Value

Type: System::Boolean

true if the instance out parameter has been set with the latest copy from the persistence store; false if the locally cached state is already up-to-date.

The following code demonstrates how to implement the EndLoadIfChanged method.

public override bool EndLoadIfChanged(IAsyncResult result, out object instance)
{
    base.ThrowIfDisposedOrNotOpen();
    instance = this.factory.EndLoad(result);
    return true;
}

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