Class DispatchedAttribute
Custom attribute that, when applied on a method, specifies that the method should be executed in UI thread.
Implements
Namespace: PostSharp.Patterns.Threading
Assembly: PostSharp.Patterns.Threading.dll
Syntax
[ProvideAspectRole("Threading")]
[MulticastAttributeUsage]
[AspectRoleDependency]
[AspectRoleDependency]
[AspectRoleDependency]
[Metric("UsedFeatures", "PostSharp.Patterns.Threading.DispatchedMethod")]
[LinesOfCodeAvoided(0)]
[Serializer]
public sealed class DispatchedAttribute : MethodLevelAspect, IMethodLevelAspect, IMethodLevelAspectBuildSemantics, IAspectBuildSemantics, IValidableAnnotation, IAspectProvider, IAspect, IService
Constructors
Name | Description |
---|---|
DispatchedAttribute() | Initializes a new DispatchedAttribute in blocking mode. |
DispatchedAttribute(DispatchedExecutionMode) | Initializes a new DispatchedAttribute and specifies whether the execution mode should be blocking or non-blocking. |
DispatchedAttribute(PortableFormatterConstructorContext) | |
DispatchedAttribute(Boolean) | Initializes a new DispatchedAttribute. |
Properties
Name | Description |
---|---|
ExecutionMode | When the aspect is applied to a void non-async method, this property determines whether the caller will continue immediately after enqueuing the call to the target method, without waiting for the method to complete. The default value is Blocking. |
FireAndForget | When the aspect is applied to a void non-async method, this property determines whether
the caller will continue immediately after enqueuing the call to the target method,
without waiting for the method to complete. The default value is |
Methods
Name | Description |
---|---|
CompileTimeValidate(MethodBase) | Method invoked at build time to ensure that the aspect has been applied to the right target. |
Explicit Interface Implementations
Name | Description |
---|---|
IAspectProvider.ProvideAspects(Object) |