Edit

Share via


LockingPersistenceProvider.LoadIfChanged Method

Definition

Loads the instance state information from the persistence store if the state information has been changed since the last time the information was loaded by the caller.

Overloads

LoadIfChanged(TimeSpan, Object, Object)

Loads the instance state information from the persistence store if the state information has been changed since the last time the information was loaded by the caller. This method does not lock the instance in the persistence store.

LoadIfChanged(TimeSpan, Object, Boolean, Object)

Loads the instance state information from the persistence store if the state information has been changed since the last time the information was loaded by the caller. This method also lets the caller specify whether to lock the instance in the persistence store.

LoadIfChanged(TimeSpan, Object, Object)

Loads the instance state information from the persistence store if the state information has been changed since the last time the information was loaded by the caller. This method does not lock the instance in the persistence store.

public:
 override bool LoadIfChanged(TimeSpan timeout, System::Object ^ instanceToken, [Runtime::InteropServices::Out] System::Object ^ % instance);
public override bool LoadIfChanged (TimeSpan timeout, object instanceToken, out object instance);
override this.LoadIfChanged : TimeSpan * obj * obj -> bool
Public Overrides Function LoadIfChanged (timeout As TimeSpan, instanceToken As Object, ByRef instance As Object) As Boolean

Parameters

timeout
TimeSpan

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

instanceToken
Object

The token returned by the previous Create or Update method calls, which represents the current state held by the caller.

instance
Object

The actual instance state information.

Returns

true if the instance should be locked in the persistence store at the end of this operation; otherwise false.

Applies to

LoadIfChanged(TimeSpan, Object, Boolean, Object)

Loads the instance state information from the persistence store if the state information has been changed since the last time the information was loaded by the caller. This method also lets the caller specify whether to lock the instance in the persistence store.

public:
 virtual bool LoadIfChanged(TimeSpan timeout, System::Object ^ instanceToken, bool lockInstance, [Runtime::InteropServices::Out] System::Object ^ % instance);
public virtual bool LoadIfChanged (TimeSpan timeout, object instanceToken, bool lockInstance, out object instance);
override this.LoadIfChanged : TimeSpan * obj * bool * obj -> bool
Public Overridable Function LoadIfChanged (timeout As TimeSpan, instanceToken As Object, lockInstance As Boolean, ByRef instance As Object) As Boolean

Parameters

timeout
TimeSpan

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

instanceToken
Object

The token returned by the previous Create or Update method calls, which represents the current state held by the caller.

lockInstance
Boolean

true if the instance should be locked in the persistence store at the end of this operation; otherwise false.

instance
Object

The instance state information.

Returns

true if the instance should be locked in the persistence store at the end of this operation; otherwise false.

Applies to