Table of Contents

Class MethodCaller

Namespace
Rinku
Assembly
Rinku.dll

Generates strongly typed delegates that call a method using Rinku's parameter-shape rules for the first delegate argument. Additional delegate arguments are passed directly to selected target parameters.

public static class MethodCaller
Inheritance
MethodCaller
Inherited Members

Remarks

The generated delegate is monomorphic. Mapping is built against the delegate's first parameter type exactly. It does not choose a different mapping after creation.

Methods

Create<TDelegate>(MethodInfo, params CallerParameter[])

Generates a caller. The first delegate argument is the mapped source. Every later argument is caller-supplied. Without callerParameters, caller-supplied arguments match target parameters by exact type.

public static TDelegate Create<TDelegate>(MethodInfo method, params CallerParameter[] callerParameters) where TDelegate : Delegate

Parameters

method MethodInfo

The static method to call, or an instance method implemented by the mapped source itself.

callerParameters CallerParameter[]

Optional positional configuration for the delegate arguments after the mapped source. Supply either none (all match by exact type), or one entry for every caller-supplied delegate argument.

Returns

TDelegate

Type Parameters

TDelegate

The exact delegate signature to generate, including the method return type.