Skip to content

JSMarshaller.BuildFromJSPropertyGetExpression method

Builds a lambda expression for a JS callback adapter to a .NET property getter. When invoked, the expression will get the property value and marshal it back to JS.

C#
public Expression<JSCallback> BuildFromJSPropertyGetExpression(PropertyInfo property)

Remarks

The returned expression takes a single JSCallbackArgs parameter and returns a JSValue. For instance methods, the this argument for the JS callback args must be a JS object that wraps a .NET object matching the property's declaring type. The lambda expression may be converted to a JSCallback delegate with Compile.

See Also

Released under the MIT license