Megosztás a következőn keresztül:


IFunctionProvider Interface

Definition

This interface enables extending the ExprTransform language with additional functions.

public interface IFunctionProvider
type IFunctionProvider = interface
Public Interface IFunctionProvider

Properties

NameSpace

The namespace for this provider. This should be a legal identifier in the expression language. Multiple providers may contribute to the same namespace.

Methods

Lookup(String)

Returns an array of overloads for the given function name. This may return null instead of an empty array. The returned MethodInfos should be public static methods that can be freely invoked by IL in a different assembly. They should also be "pure" functions - with the output only depending on the inputs and NOT on any global state.

ResolveToConstant(String, MethodInfo, Object[])

If the function's value can be determined by the given subset of its arguments, this should return the resulting value. Note that this should only be called if values is non-empty and contains at least one null. If all the arguments are non-null, then the MethodInfo will be invoked to produce the value.

Applies to