ExplicitlySynchronizedAttribute Constructor (Boolean) |
Initializes a new ExplicitlySynchronizedAttribute and specifies the synchronization strategy.
Namespace: PostSharp.Patterns.Threading
Assembly: PostSharp.Patterns.Threading (in PostSharp.Patterns.Threading.dll) Version: 2023.0.3.0 (2023.0.3.0)
C#
public ExplicitlySynchronizedAttribute( bool appliesToMethodOnly )
Parameters
- appliesToMethodOnly
- Type: System.Boolean
true to avoid adding any synchronization code to the target method, false to add synchronization code that allows the method to access other field or method of the target object.