PostSharpAPI ReferencePost­Sharp.​Patterns.​ThreadingSynchronized­Attribute
Open sandboxFocus

SynchronizedAttribute Class

Custom attribute that, when applied to a class, implements the SynchronizedThreadingModel into this class. In a synchronized object, only a single thread can access the object at a time. If a second thread needs to access the object while it is in used by a first thread, the second thread has to wait until the first thread completes its access.

Namespace: PostSharp.Patterns.Threading
Assembly: PostSharp.Patterns.Threading.dll
Syntax
[Metric("UsedFeatures", "PostSharp.Patterns.Threading.Synchronized")]
[Serializer]
public sealed class SynchronizedAttribute : ThreadAwareAttribute, ITypeLevelAspect, ITypeLevelAspectBuildSemantics, IAspectBuildSemantics, IValidableAnnotation, ICloneAwareAspect, IInstanceScopedAspect, IAspectProvider, IService, IAdviceProvider, IAspect, IThreadAwareImplementationProvider, IThreadAware, IQueryInterface

Constructors

Name Description
SynchronizedAttribute()
SynchronizedAttribute(PortableFormatterConstructorContext)