-
Notifications
You must be signed in to change notification settings - Fork 0
API Host ScriptSourceReference
Liu.Yandong.Hanks edited this page Aug 26, 2026
·
6 revisions
已解析的源引用,其规范化的 FullPath 是编译器和运行时模块标识。
命名空间:AuroraScript.Core。类型:struct。
Source Resolver 在解析入口、import 或 include 后返回此值。FullPath 在整个编译和运行时注册中标识源;ModulePath 是解析器相对显示/源信息,不是 @module 名称。
ScriptSourceReference 的最小用法。
var reference = new ScriptSourceReference(
"mem://app/",
"main.as");
Console.WriteLine(reference.FullPath); // mem://app/main.as创建 ScriptSourceReference 实例。
ScriptSourceReference(string baseDirectory, string fullPath)参数
| 名称 | 类型 | 必需 | 说明 |
|---|---|---|---|
baseDirectory |
string |
是 | 与源引用关联的解析器根。 |
fullPath |
string |
是 | 规范化的绝对路径或虚拟源标识符。 |
返回值
新的 ScriptSourceReference 实例。
创建 ScriptSourceReference 实例。
ScriptSourceReference(string baseDirectory, string fullPath, string modulePath)参数
| 名称 | 类型 | 必需 | 说明 |
|---|---|---|---|
baseDirectory |
string |
是 | 与源引用关联的解析器根。 |
fullPath |
string |
是 | 规范化的绝对路径或虚拟源标识符。 |
modulePath |
string |
是 | 用于显示和源相对行为的解析器相对源路径。不是模块名称或标识。 |
返回值
新的 ScriptSourceReference 实例。
应读取此引用的解析器根。
string BaseDirectory参数
无。
返回值
返回 string。
规范化的绝对文件路径或虚拟源标识符。
string FullPath参数
无。
返回值
返回 string。
用于显示和源相对行为的解析器相对源路径。不是模块名称或注册表标识。
string ModulePath参数
无。
返回值
返回 string。
AuroraScript.JIT 4.0.0 · 文档首页 · 仓库 · MIT License