PostSharp.ILAPI ReferencePost­Sharp.​AspectsSemantically­Advised­Method­Kinds
Open sandboxFocus

SemanticallyAdvisedMethodKinds Class

Enumerates possible target methods for semantic advising.

Inheritance
SemanticallyAdvisedMethodKinds
Namespace: PostSharp.Aspects
Assembly: PostSharp.dll
Syntax
public sealed class SemanticallyAdvisedMethodKinds : Enum

Fields

Name Description
All

Apply semantic advising to all possible target methods.

Async

Apply semantic advising to async methods.

AsyncIterator

Apply semantic advising to async methods which return IAsyncEnumerable. Semantic advising for this C# 8.0 feature is not supported by PostSharp yet.

Default

The default behavior includes Async, ReturnsAwaitable, Iterator, and AsyncIterator, but not ReturnsEnumerable.

Iterator

Apply semantic advising to iterator methods (methods that use yield statements).

None

Do not use semantic advising.

ReturnsAwaitable

Apply semantic advising to methods that return any awaitable type (e.g. System.Threading.Tasks.Task).

ReturnsEnumerable

Apply semantic advising to methods that return IEnumerable, IEnumerator, System.Collections.Generic.IEnumerable<>, or IEnumerator<T>.

value__