UnsupportedTargetAction
Gets or sets the action to take when the advice is applied to an async method with unsupported return value type.
Declaration
public UnsupportedTargetAction UnsupportedTargetAction { get; set; }Property Value
| Type | Description |
|---|---|
| UnsupportedTargetAction |
Remarks
Starting with C# 7, async methods can have return types other than Task or Task<TResult>. Async method interception does not support this type of async methods. By default, a build error is raised whenever async method interception is applied to a method that returns an awaitable type other than Task or Task<TResult>.
Set this property to change how unsupported async methods are handled during compile time.
Set this property on the master advice of a group. Setting it on another advice of the group, which sets the Master property or joins the group implicitly, is a build-time error.