Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Threading Namespace / Concurrent­Access­Token Structure

ConcurrentAccessToken Structure

Token returned by the AcquireAccess(ObjectAccessLevel, ConcurrentAccessToken) method. This token is intended to be used in a using block. Consumers of this method must call Complete() on success, and Dispose() on exception.

Namespace:  PostSharp.Patterns.Threading
Assembly:  PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 5.0.38.0 (5.0.38.0)
Syntax
C#
public struct ConcurrentAccessToken : IDisposable

The ConcurrentAccessToken type exposes the following members.

Properties
  NameDescription
Public propertyStatic memberNull
Gets a null instance of the ConcurrentAccessToken type.
Methods
  NameDescription
Public methodCancel
Indicates that the operation requiring access on an object failed.
Public methodCheckContext
Determines whether the current ConcurrentAccessToken is valid in the current context.
Public methodComplete
Indicates that the operation requiring access on an object has successfully completed.
Public methodDispose
Indicates that the operation requiring access on an object has completed. If the Complete() method is not invoked before the Dispose() method, the transaction is considered to have failed. Current threading models do not support transactions and therefore this semantic is currently unused, but it may be used in the future.
Extension Methods
  NameDescription
Public Extension MethodQueryInterface<T>
Gets the implementation of a specified interface for the specified object.
(Defined by QueryInterfaceExtensions.)
See Also