TechTalk Genome v4.2

OptimisticLockArgs Constructor (IOptimisticLockVersion, Boolean)

Initializes a new OptimisticLockArgs with the specified reference version.

public OptimisticLockArgs(
   IOptimisticLockVersion version,
   bool explicitLock
);

Parameters

version
The reference version to use as client version when putting an optimistic lock on an object.
explicitLock
Indicating whether to override the configured locking behaviour and lock the object in the Context on which the lock operation was called, or use the configured locking mechanism, delegating the lock. The default value is false.

Remarks

When Context.Lock or Context.TryLock is called with an instance of OptimisticLockArgs, the value of the Version will be used as the client version instead of retreiving the server version of the object at the moment of locking.

Use OptimisticLockingSemantics.GetClientVersion Overload List to retreive a version that can be used as a reference version in a later call to Context.Lock or Context.TryLock .

Requirements

Namespace: TechTalk.Genome.Locking

Assembly: TechTalk.Genome (in TechTalk.Genome.dll)

Version: 4.2.4.4

Editions: Professional, Evaluation, Express

See Also

OptimisticLockArgs Class | TechTalk.Genome.Locking Namespace | OptimisticLockArgs Constructor Overload List