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

Class ActorAttribute

Custom attribute that, when applied to a class, implements the ActorThreadingModel to this class, in which calls to methods are processed asynchronously from a single thread, suppressing concurrency inside each instance of the target class.

Namespace: PostSharp.Patterns.Threading
Assembly: PostSharp.Patterns.Threading.dll
Syntax
[ProvideAspectRole("ThreadingModel")]
[AspectRoleDependency]
[AspectRoleDependency]
[AspectRoleDependency]
[AspectRoleDependency]
[Metric("UsedFeatures", "PostSharp.Patterns.Threading.Actor")]
[IntroduceInterface]
[HasConstraint]
[Serializer]
public sealed class ActorAttribute : ThreadAwareAttribute, ITypeLevelAspect, ITypeLevelAspectBuildSemantics, IAspectBuildSemantics, IValidableAnnotation, ICloneAwareAspect, IInstanceScopedAspect, IAspectProvider, IService, IAdviceProvider, IAspect, IQueryInterface, IActor, IDispatcherObject, IThreadAware

Constructors

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

Methods

Name Description
OnEventInvoke(EventInterceptionArgs)
OnInstanceConstructed()
ProvideAspects(Type)

Explicit Interface Implementations

Name Description
IActor.Dispatcher
IDispatcherObject.Dispatcher