Multi.Scripting
2.0.0
dotnet add package Multi.Scripting --version 2.0.0
NuGet\Install-Package Multi.Scripting -Version 2.0.0
<PackageReference Include="Multi.Scripting" Version="2.0.0" />
<PackageVersion Include="Multi.Scripting" Version="2.0.0" />
<PackageReference Include="Multi.Scripting" />
paket add Multi.Scripting --version 2.0.0
#r "nuget: Multi.Scripting, 2.0.0"
#:package Multi.Scripting@2.0.0
#addin nuget:?package=Multi.Scripting&version=2.0.0
#tool nuget:?package=Multi.Scripting&version=2.0.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. (Due to a bug, the documentation was inaccessible before version 1.7.1! I apologize for the inconvinience and confusion.)
Notes on host types:
When a C# object is injected into the script, keep in mind that the type must be marked as public. Otherwise, member accessing may fail and throw an exception.
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 attempting 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. To use LINQ methods directly on javascript objects, you may use the Query class, which takes a params array or an IEnumerable as a constructor argument.
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 exception was thrown. For objects which can be disposed asynchronously, there exists the UseAsync() method.
Notes on Clearscript:
The javascript execution is done through Clearscript. To simplify 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>() may be achieved via the static Empty.Array method.
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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net6.0
- JetBrains.Annotations (>= 2025.2.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.
Version | Downloads | Last Updated |
---|---|---|
2.0.0 | 30 | 8/15/2025 |
1.9.1 | 123 | 1/22/2025 |
1.9.0 | 115 | 1/18/2025 |
1.8.2 | 107 | 1/10/2025 |
1.8.1 | 110 | 12/30/2024 |
1.8.0 | 109 | 12/30/2024 |
1.7.4 | 112 | 10/5/2024 |
1.7.3 | 131 | 9/28/2024 |
1.7.2 | 119 | 9/28/2024 |
1.7.1 | 115 | 9/27/2024 |
1.7.0 | 109 | 9/26/2024 |
1.6.1 | 130 | 9/18/2024 |
1.6.0 | 118 | 9/18/2024 |
1.5.0 | 137 | 9/17/2024 |
1.4.0 | 139 | 9/16/2024 |
1.3.0 | 121 | 9/8/2024 |
1.2.0 | 121 | 9/8/2024 |
1.1.0 | 124 | 9/8/2024 |
1.0.0 | 147 | 9/7/2024 |