PostSharpAPI ReferencePost­Sharp.​Patterns.​ThreadingRequires­Thread­Safe­Attribute
Open sandboxFocus

RequiresThreadSafeAttribute Class

Custom attribute that, when applied to a field, property or parameter, checks that the assigned object is thread safe. Otherwise, the assignment results in an ArgumentException/

Inheritance
RequiresThreadSafeAttribute
Namespace: PostSharp.Patterns.Threading
Assembly: PostSharp.Patterns.Threading.dll
Syntax
[MulticastAttributeUsage]
[Serializer]
public sealed class RequiresThreadSafeAttribute : LocationLevelAspect, ILocationLevelAspect, ILocationLevelAspectBuildSemantics, IAspectBuildSemantics, IValidableAnnotation, ILocationValidationAspect<object>, ILocationValidationAspect, IAspect

Constructors

Name Description
RequiresThreadSafeAttribute() PostSharp.Patterns.Threading.RequiresThreadSafeAttribute
RequiresThreadSafeAttribute(PortableFormatterConstructorContext)

Methods

Name Description
RuntimeInitialize(LocationInfo)

Initializes the current aspect.

Explicit Interface Implementations

Name Description
ILocationValidationAspect<Object>.ValidateValue(Object, String, LocationKind, LocationValidationContext)