The stage of a method interception at which the intercepted methods are selected. It filters the methods, decides whether the calls bound to their overrides and to their interface implementations match, and then chooses how the calls are intercepted.
Namespace: Metalama.Extensions.Interceptors
Assembly: Metalama.Extensions.Interceptors.dll
Syntax
[CompileTime]
[InternalImplement]
public interface IMethodSelection : IMethodResultFactoryRemarks
By default, a call matches a selected method when it is bound to that method or to an override of it.
Methods
| Name | Description |
|---|---|
| ExcludingOverrides() | Does not match the calls bound to an override of a selected method. Only the calls bound to the selected method itself match. |
| ForEachSite(Func<IMethodInterceptionSite, IMethodInterception>) | Decides the interception of each call site with a delegate, for instance to skip some call sites or to choose a template per site. |
| IncludingInterfaceImplementations() | Also matches the calls bound to a method that implements a selected interface method, implicitly or explicitly. |
| Where(Func<IMethod, bool>) | Keeps only the selected methods that a predicate accepts, for instance one overload of a method name. |