PostSharp6.1/API Reference/Post­Sharp.​Aspects Namespace/Null­Task­Sentinel Class

NullTaskSentinel Class

The singleton instance of this class is assigned to the ReturnValue property when an OnMethodBoundaryAspect aspect is applied semantically to a method and the target method returns a null task.
Inheritance Hierarchy
System.Object
  PostSharp.Aspects.NullTaskSentinel

Namespace:  PostSharp.Aspects
Assembly:  PostSharp (in PostSharp.dll) Version: 6.1.23.0 (6.1.23.0)
Syntax
C#
public sealed class NullTaskSentinel

The NullTaskSentinel type exposes the following members.

Constructors
  NameDescription
Public methodNullTaskSentinel
Initializes a new instance of the NullTaskSentinel class
Properties
  NameDescription
Public propertyStatic memberInstance
The singleton instance that is assigned to the ReturnValue property when an OnMethodBoundaryAspect aspect is applied semantically to a method and the target method returns a null task.
Remarks
When an OnMethodBoundaryAspect aspect is applied semantically to a method, then the ReturnValue property represents the result of executing the task returned by the method. If the method returns a null task, then the result is undefined. The Instance is used to represent this case.
See Also