PersistenceProvider::LoadIfChanged Method (TimeSpan, Object^, Object^%)
When implemented in a derived class, loads service state information from the persistence store if that data has been changed.
Assembly: System.WorkflowServices (in System.WorkflowServices.dll)
public: virtual bool LoadIfChanged( TimeSpan timeout, Object^ instanceToken, [OutAttribute] Object^% instance )
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, which represents the current state held by the caller.
- instance
-
Type:
System::Object^%
The actual instance state.
Return Value
Type: System::Booleantrue if the instanceout 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 LoadIfChanged method.
public override bool LoadIfChanged(TimeSpan timeout, object instanceToken, out object instance) { base.ThrowIfDisposedOrNotOpen(); instance = this.factory.Load(this.Id, timeout); return true; }
Available since 3.5