-
Notifications
You must be signed in to change notification settings - Fork 0
API Host RuntimeOptionsBuilder
供 EngineOptions.WithRuntime 使用的可变配置构建器。
Mutable builder used by EngineOptions.WithRuntime.
命名空间:AuroraScript。类型:class。
Namespace:
AuroraScript. Kind: class.
Purpose
RuntimeOptionsBuilder 是公开宿主类型。通过下方签名选择调用方式;对运行时对象、生命周期和异常,应由宿主在边界处明确处理。
Mutable builder used by EngineOptions.WithRuntime.
Simple Example
下面是 RuntimeOptionsBuilder 的最小使用方式。
A minimal use of
RuntimeOptionsBuilder.
var options = EngineOptions.Default.WithRuntime(builder =>
{
builder.HotReload = true;
builder.StringPooling = StringPoolingStrategy.Intern;
});Members
创建 RuntimeOptionsBuilder 实例。
Use the member according to its public signature.
Parameters:
-
options
控制此操作的配置。Configuration controlling this operation.
Returns
新建的 RuntimeOptionsBuilder 实例。
A new
RuntimeOptionsBuilderinstance.
调用示意
以下示例展示调用形状;将占位实例和参数替换为宿主中的实际值。
The example shows the call shape; replace placeholder instances and arguments with actual host values.
var value = new RuntimeOptionsBuilder(/* 参数 */);读取 HotReload 属性。
Use the member according to its public signature.
Parameters:
- 无。
None.
Returns
返回 bool。
Returns
bool.
调用示意
以下示例展示调用形状;将占位实例和参数替换为宿主中的实际值。
The example shows the call shape; replace placeholder instances and arguments with actual host values.
RuntimeOptionsBuilder value = /* 从宿主 API 获取实例 */;
var current = value.HotReload;读取 JsonSerializer 属性。
Use the member according to its public signature.
Parameters:
- 无。
None.
Returns
返回 ScriptJsonSerializer。
Returns
ScriptJsonSerializer.
调用示意
以下示例展示调用形状;将占位实例和参数替换为宿主中的实际值。
The example shows the call shape; replace placeholder instances and arguments with actual host values.
RuntimeOptionsBuilder value = /* 从宿主 API 获取实例 */;
var current = value.JsonSerializer;读取 DateTimeFormat 属性。
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.
RuntimeOptionsBuilder value = /* 从宿主 API 获取实例 */;
var current = value.DateTimeFormat;读取 ConsoleStdOut 属性。
Use the member according to its public signature.
Parameters:
- 无。
None.
Returns
返回 TextWriter。
Returns
TextWriter.
调用示意
以下示例展示调用形状;将占位实例和参数替换为宿主中的实际值。
The example shows the call shape; replace placeholder instances and arguments with actual host values.
RuntimeOptionsBuilder value = /* 从宿主 API 获取实例 */;
var current = value.ConsoleStdOut;读取 ConsoleErrorOut 属性。
Use the member according to its public signature.
Parameters:
- 无。
None.
Returns
返回 TextWriter。
Returns
TextWriter.
调用示意
以下示例展示调用形状;将占位实例和参数替换为宿主中的实际值。
The example shows the call shape; replace placeholder instances and arguments with actual host values.
RuntimeOptionsBuilder value = /* 从宿主 API 获取实例 */;
var current = value.ConsoleErrorOut;读取 StringPooling 属性。
Use the member according to its public signature.
Parameters:
- 无。
None.
Returns
返回 StringPoolingStrategy。
Returns
StringPoolingStrategy.
调用示意
以下示例展示调用形状;将占位实例和参数替换为宿主中的实际值。
The example shows the call shape; replace placeholder instances and arguments with actual host values.
RuntimeOptionsBuilder value = /* 从宿主 API 获取实例 */;
var current = value.StringPooling;签名
RuntimeOptionsBuilder WithHotReload(bool value)RuntimeOptionsBuilder WithJsonSerializer(ScriptJsonSerializer value)RuntimeOptionsBuilder WithDateTimeFormat(string value)RuntimeOptionsBuilder WithConsoleStdOut(TextWriter value)RuntimeOptionsBuilder WithConsoleErrorOut(TextWriter value)RuntimeOptionsBuilder WithStringPooling(StringPoolingStrategy 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.
RuntimeOptionsBuilder value = /* 从宿主 API 获取实例 */;
var result = value.WithMethods(/* value */);AuroraScript.JIT 4.0.0 · Documentation Home · Repository · MIT License