Open sandboxFocus

Class PrivateThreadAwareAttribute

Custom attribute that, when applied to a class, applies the PrivateThreadingModel to this class. In this model, the threading model of an object is determined by the parent it is assigned to in a parent-child relationship.

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

Use this attribute on classes whose instances are the private state of a parent object, for instance the child objects of an actor. Declare the relationship with the ChildAttribute custom attribute on the parent. The object uses the concurrency controller of its parent and does not synchronize accesses by itself.

Constructors

Name Description
PrivateThreadAwareAttribute()
PrivateThreadAwareAttribute(PortableFormatterConstructorContext)

See Also