Open sandboxFocus

Interface IMethodResultFactory

Chooses how the selected calls are intercepted: redirected to an existing method, or redirected to a method synthesized from a template. It is the base of IMethodSelection, for a result that applies to every call site, and of IMethodInterceptionSite, for the result of one call site.

Namespace: Metalama.Extensions.Interceptors
Assembly: Metalama.Extensions.Interceptors.dll
Syntax
[CompileTime]
[InternalImplement]
public interface IMethodResultFactory

Methods

Name Description
RedirectToExistingMethod(IMethod)

Redirects the calls to an existing method.

RedirectToSynthesizedMethod(in MethodTemplateSelector)

Redirects the calls to a method synthesized from a template given as a MethodTemplateSelector.

RedirectToSynthesizedMethod(TemplateInvocation)

Redirects the calls to a method synthesized from a template given as a TemplateInvocation, which also gives the arguments and the template provider.

RedirectToSynthesizedMethod(string)

Redirects the calls to a method synthesized from the template of the given name.

Extension Methods