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/
Implements
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() | |
RequiresThreadSafeAttribute(PortableFormatterConstructorContext) |
Methods
Name | Description |
---|---|
RuntimeInitialize(LocationInfo) | Initializes the current aspect. |
Explicit Interface Implementations
Name | Description |
---|---|
ILocationValidationAspect<Object>.ValidateValue(Object, String, LocationKind, LocationValidationContext) | Validates the value being assigned to the location to which the current aspect has been applied. |