JSCollectionExtensions.AsReadOnlyList<T> method
Creates a read-only list adapter for a JS Array object, without copying.
C#
public static IReadOnlyList<T> AsReadOnlyList<T>(this JSArray array, To<T> fromJS)
Remarks
This method must be called from the JS thread. The returned list object is thread-safe and may be accessed from threads other than the JS thread (though accessing from the JS thread is more efficient).
See Also
- struct JSArray
- delegate To<T>
- class JSCollectionExtensions
- namespace Microsoft.JavaScript.NodeApi.Interop