Multi.Scripting
1.5.0
See the version list below for details.
dotnet add package Multi.Scripting --version 1.5.0
NuGet\Install-Package Multi.Scripting -Version 1.5.0
<PackageReference Include="Multi.Scripting" Version="1.5.0" />
paket add Multi.Scripting --version 1.5.0
#r "nuget: Multi.Scripting, 1.5.0"
// Install Multi.Scripting as a Cake Addin #addin nuget:?package=Multi.Scripting&version=1.5.0 // Install Multi.Scripting as a Cake Tool #tool nuget:?package=Multi.Scripting&version=1.5.0
Package Description:
Multi.Scripting provides classes and interfaces to run javascript code. It supplies a namespace structure to organise values and functions, allowing user specified data sources.
Further documentation on methods, properties, classes and interfaces may be found on the respective element as in-code summaries.
Notes on LINQ:
To use LINQ in your javascript code successfully, use the TypeRegistry class's AddLinq() method. Since LINQ pipelines may defer their execution, you may encounter an exception when returning an IEnumerable in the javascript code and attemtping to enumerate it after the end of the V8ScriptEngine's lifespan. Unfortunately, due to a conflict with method overloads, all Enumerable.GroupBy overloads containing a resultSelector lack JSLINQ variants. Using a Enumerable.Select() may sufficiently replicate their behaviour.
Notes on V8ScriptEngine's lifespan and MultiContinuation:
The V8ScriptEngine's lifespan is to be kept as short as possible for performance sake. For this reason, every method using the engine disposes of it as soon as it is done with it. This, of course, leads to its own problems (see above), which is why you may use methods exposing a MultiContinuation to further use the same instance of the engine for subsequent function invokations and more.
!! REMEMBER TO DISPOSE OF THE CONTINUATION ONCE YOU ARE DONE !!
Notes on disposable objects:
To make sure a disposable object is properly disposed in javascript code, it is recommended to use the extension method Use(). The Use() method takes a delegate as an argument and will dispose the object after the delegate has been invoked, or an exceütion was thrown. For objects which can be disposed asynchronously, there exists the UseAsync() method.
Notes on Clearscript:
The javascript execution is done through Clearscript. You can not use the notation for generic type arguments in javascript code. To allow the construction of C#'s List and Dictionary classes, non-generic classes have been added, which inherit from the respectively equally named generic class. Similarly, Array.Empty<T>() is unavailable, for which the static Empty class has been added. Use Empty.Array instead.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- Microsoft.ClearScript.Complete (>= 7.4.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.