Skip to content

JSMarshaller.BuildToJSMethodExpression method

Builds a lambda expression for a .NET adapter to a JS method. When invoked, the delegate will marshal the arguments to JS, invoke the method on the JS class or instance, then marshal the return value (or exception) back to .NET.

C#
public LambdaExpression BuildToJSMethodExpression(MethodInfo method)

Remarks

The expression has an extra initial argument of type JSValue that is the JS object on which the method will be invoked. For static methods that is the JS class object; for instance methods it is the JS instance. The lambda expression may be converted to a delegate with Compile.

See Also

Released under the MIT license