PostSharp.ILAPI ReferencePost­Sharp.​Patterns.​ThreadingThread­Unsafe­Attribute
Open sandboxFocus

ThreadUnsafeAttribute Class

Custom attribute that, when applied on a type, ensures that only one thread executes in methods of this type. When more than one thread accesses methods of this type, a ConcurrentAccessException exception is thrown.

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

Constructors

Name Description
ThreadUnsafeAttribute()

Initializes a new ThreadUnsafeAttribute. policy.

ThreadUnsafeAttribute(PortableFormatterConstructorContext)