-
Notifications
You must be signed in to change notification settings - Fork 0
API Host BuiltInModulesBuilder
Mutable builder used by EngineOptions.WithBuiltIns.
Namespace: AuroraScript.Runtime.Package. Kind: class.
Back to .NET Host API Reference
The builder starts with the definitions already present in the source EngineOptions. Calls mutate only the temporary builder; WithBuiltIns returns a new immutable options snapshot.
var options = EngineOptions.Default.WithBuiltIns(builtIns =>
{
builtIns
.Add(BuiltInModules.FileSystem)
.Add(BuiltInModules.HttpClient);
});BuiltInModulesBuilder(IReadOnlyList<BuiltInModuleDefinition> definitions)Initializes a builder from an existing definition list. The list cannot be null, cannot contain null, and cannot contain duplicate module names or import paths.
Normal host configuration uses EngineOptions.WithBuiltIns, which creates this builder automatically.
BuiltInModulesBuilder Add(BuiltInModuleDefinition definition)Adds one definition and returns the same builder for chaining. definition cannot be null. Duplicate Name or ModulePath values throw InvalidOperationException.
BuiltInModulesBuilder Clear()Removes all definitions and returns the same builder.
var withoutNativeCapabilities = existing.WithBuiltIns(builtIns =>
builtIns.Clear());AuroraScript.JIT 4.0.0 · Documentation Home · Repository · MIT License