PostSharp 2023.0 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Dynamic­Advising Namespace / Dynamically­Advisable­Object Class / Dynamically­Advisable­Object Methods / Dynamically­Advisable­Object.​Get­Advice­Enumerator(T) Method

DynamicallyAdvisableObject.GetAdviceEnumerator<T> Method

Gets an AdviceEnumerator<T> for all advices implementing a given interface on the current object.

Namespace:  PostSharp.Patterns.DynamicAdvising
Assembly:  PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 2023.0.3.0 (2023.0.3.0)
public AdviceEnumerator<T> GetAdviceEnumerator<T>()
where T : class, IDynamicAdvice

Type Parameters

Interface to be implemented by the advice

Return Value

Type: AdviceEnumerator<T>
An AdviceEnumerator<T> that enumerates all advices of type T on the current object.
See Also