JSCollectionExtensions.AsCollection<T> method (1 of 2)
Creates a collection adapter for a JS Array object, without copying.
C#
public static ICollection<T> AsCollection<T>(this JSArray array, To<T> fromJS, From<T> toJS)
Remarks
This method must be called from the JS thread. The returned collection 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>
- delegate From<T>
- class JSCollectionExtensions
- namespace Microsoft.JavaScript.NodeApi.Interop
JSCollectionExtensions.AsCollection<T> method (2 of 2)
Creates a collection adapter for a JS Set object, without copying.
C#
public static ICollection<T> AsCollection<T>(this JSSet set, To<T> fromJS, From<T> toJS)
Remarks
This method must be called from the JS thread. The returned collection 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 JSSet
- delegate To<T>
- delegate From<T>
- class JSCollectionExtensions
- namespace Microsoft.JavaScript.NodeApi.Interop