-
Notifications
You must be signed in to change notification settings - Fork 0
API Host NumberValue
不可变的脚本数值包装类型。
Immutable script number wrapper.
命名空间:AuroraScript.Runtime.Types。类型:class。
Namespace:
AuroraScript.Runtime.Types. Kind: class.
NumberValue 是公开宿主类型。通过下方签名选择调用方式;对运行时对象、生命周期和异常,应由宿主在边界处明确处理。
Immutable script number wrapper.
下面是 NumberValue 的最小使用方式。
A minimal use of
NumberValue.
var count = NumberValue.Of(42);
Console.WriteLine(count.Int32Value); // 42创建 NumberValue 实例。
Use the member according to its public signature.
Parameters:
-
dValue
按签名提供的double参数。The
doubleparameter required by the signature.
Returns
新建的 NumberValue 实例。
A new
NumberValueinstance.
调用示意
以下示例展示调用形状;将占位实例和参数替换为宿主中的实际值。
The example shows the call shape; replace placeholder instances and arguments with actual host values.
var value = new NumberValue(/* 参数 */);读取 DoubleValue 属性。
Use the member according to its public signature.
Parameters:
- 无。
None.
Returns
返回 double。
Returns
double.
调用示意
以下示例展示调用形状;将占位实例和参数替换为宿主中的实际值。
The example shows the call shape; replace placeholder instances and arguments with actual host values.
NumberValue value = /* 从宿主 API 获取实例 */;
var current = value.DoubleValue;读取 Int32Value 属性。
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.
NumberValue value = /* 从宿主 API 获取实例 */;
var current = value.Int32Value;读取 Int64Value 属性。
Use the member according to its public signature.
Parameters:
- 无。
None.
Returns
返回 long。
Returns
long.
调用示意
以下示例展示调用形状;将占位实例和参数替换为宿主中的实际值。
The example shows the call shape; replace placeholder instances and arguments with actual host values.
NumberValue value = /* 从宿主 API 获取实例 */;
var current = value.Int64Value;调用 Of 完成其公开操作。
Use the member according to its public signature.
Parameters:
-
value
要处理、保存或转换的值。Value to process, store, or convert.
Returns
返回 NumberValue。
Returns
NumberValue.
调用示意
以下示例展示调用形状;将占位实例和参数替换为宿主中的实际值。
The example shows the call shape; replace placeholder instances and arguments with actual host values.
var result = NumberValue.Of(/* value */);AuroraScript.JIT 4.0.0 · Documentation Home · Repository · MIT License