PostSharpAPI ReferencePost­Sharp.​Patterns.​ThreadingIConcurrency­ControllerAcquire­Access
Open sandboxFocus

IConcurrencyController.AcquireAccess Method

AcquireAccess(ObjectAccessLevel, ref ConcurrentAccessToken)

Acquires access on the entity for the current thread and waits synchronously if access cannot be immediately acquired.

void AcquireAccess(ObjectAccessLevel objectAccessLevel, ref ConcurrentAccessToken concurrencyAccessToken)
Type Name Description
ObjectAccessLevel objectAccessLevel

The required access level on the entity.

ConcurrentAccessToken concurrencyAccessToken

An opaque ConcurrentAccessToken, typically used in a using block. Consumers must invoke the Complete() method upon success before exiting the using block.