Skip to content

JSInterface.DynamicInvoke method (1 of 2) ​

Dynamically invokes an interface method JS adapter delegate after obtaining the JS this value from the reference. Automatically switches to the JS thread if needed.

C#
protected object? DynamicInvoke(Delegate interfaceMethod, object?[] args)
parameterdescription
interfaceMethodInterface method JS adapter delegate.
argsArray of method arguments starting at index 1. Index 0 is reserved for the JS this value.

Remarks ​

This method is used by the dynamically-emitted interface marshalling code.

See Also ​


JSInterface.DynamicInvoke method (2 of 2) ​

Dynamically invokes an interface method JS adapter delegate after obtaining the JS this value from the reference. Automatically switches to the JS thread if needed.

C#
protected object? DynamicInvoke(MethodInfo interfaceMethod, 
    Func<MethodInfo, Delegate> delegateProvider, object?[] args)
parameterdescription
interfaceMethodInterface method to invoke.
delegateProviderCallback function that returns a JS adapter delegate for the interface method. The callback runs on the JS thread.
argsArray of method arguments starting at index 1. Index 0 is reserved for the JS this value.

Remarks ​

This method is used by the dynamically-emitted interface marshalling code.

See Also ​

Released under the MIT license