-
Notifications
You must be signed in to change notification settings - Fork 0
API Host CompilerOptionsBuilder
供 EngineOptions.WithCompiler 使用的可变配置构建器。
Mutable builder used by EngineOptions.WithCompiler.
命名空间:AuroraScript。类型:class。
Namespace:
AuroraScript. Kind: class.
CompilerOptionsBuilder 是公开宿主类型。通过下方签名选择调用方式;对运行时对象、生命周期和异常,应由宿主在边界处明确处理。
Mutable builder used by EngineOptions.WithCompiler.
下面是 CompilerOptionsBuilder 的最小使用方式。
A minimal use of
CompilerOptionsBuilder.
var options = EngineOptions.Default.WithCompiler(builder =>
{
builder.Mode = CompilationMode.Dynamic;
builder.SourceResolver = ScriptSources.FileSystem("./scripts");
});创建 CompilerOptionsBuilder 实例。
Use the member according to its public signature.
Parameters:
-
options
控制此操作的配置。Configuration controlling this operation.
Returns
新建的 CompilerOptionsBuilder 实例。
A new
CompilerOptionsBuilderinstance.
调用示意
以下示例展示调用形状;将占位实例和参数替换为宿主中的实际值。
The example shows the call shape; replace placeholder instances and arguments with actual host values.
var value = new CompilerOptionsBuilder(/* 参数 */);读取 Mode 属性。
Use the member according to its public signature.
Parameters:
- 无。
None.
Returns
返回 CompilationMode。
Returns
CompilationMode.
调用示意
以下示例展示调用形状;将占位实例和参数替换为宿主中的实际值。
The example shows the call shape; replace placeholder instances and arguments with actual host values.
CompilerOptionsBuilder value = /* 从宿主 API 获取实例 */;
var current = value.Mode;读取 ExtName 属性。
Use the member according to its public signature.
Parameters:
- 无。
None.
Returns
返回 string。
Returns
string.
调用示意
以下示例展示调用形状;将占位实例和参数替换为宿主中的实际值。
The example shows the call shape; replace placeholder instances and arguments with actual host values.
CompilerOptionsBuilder value = /* 从宿主 API 获取实例 */;
var current = value.ExtName;读取 MaxDegreeOfParallelism 属性。
Use the member according to its public signature.
Parameters:
- 无。
None.
Returns
返回 int。
Returns
int.
调用示意
以下示例展示调用形状;将占位实例和参数替换为宿主中的实际值。
The example shows the call shape; replace placeholder instances and arguments with actual host values.
CompilerOptionsBuilder value = /* 从宿主 API 获取实例 */;
var current = value.MaxDegreeOfParallelism;读取 SourceResolver 属性。
Use the member according to its public signature.
Parameters:
- 无。
None.
Returns
返回 IScriptSourceResolver。
Returns
IScriptSourceResolver.
调用示意
以下示例展示调用形状;将占位实例和参数替换为宿主中的实际值。
The example shows the call shape; replace placeholder instances and arguments with actual host values.
CompilerOptionsBuilder value = /* 从宿主 API 获取实例 */;
var current = value.SourceResolver;签名
CompilerOptionsBuilder WithMode(CompilationMode value)CompilerOptionsBuilder WithExtName(string value)CompilerOptionsBuilder WithMaxDegreeOfParallelism(int value)CompilerOptionsBuilder WithSourceResolver(IScriptSourceResolver value)
调用 WithMethods 完成其公开操作。
Use the member according to its public signature.
Parameters:
-
value
要处理、保存或转换的值。Value to process, store, or convert.
Returns
由公开签名定义的返回值。
The value defined by the public signature.
调用示意
以下示例展示调用形状;将占位实例和参数替换为宿主中的实际值。
The example shows the call shape; replace placeholder instances and arguments with actual host values.
CompilerOptionsBuilder value = /* 从宿主 API 获取实例 */;
var result = value.WithMethods(/* value */);AuroraScript.JIT 4.0.0 · Documentation Home · Repository · MIT License