Skip to content

API Host ScriptSourceReference

liu.yandong.hanks edited this page Aug 23, 2026 · 4 revisions

ScriptSourceReference

Resolved source reference whose normalized FullPath is the compiler and runtime module identity.

Namespace: AuroraScript.Core. Kind: struct.

Back to .NET Host API Reference

Overview

The Source Resolver returns this value after resolving an entry, import, or include. FullPath identifies the source throughout compilation and runtime registration; ModulePath is resolver-relative display/source information and is not an @module name.

Quick Reference

A minimal use of ScriptSourceReference.

var reference = new ScriptSourceReference(
    "mem://app/",
    "main.as");

Console.WriteLine(reference.FullPath); // mem://app/main.as

Constructors

ScriptSourceReference(string baseDirectory, string fullPath)

Creates a ScriptSourceReference instance.

ScriptSourceReference(string baseDirectory, string fullPath)

Parameters

Name Type Required Description
baseDirectory string Yes Resolver root associated with the source reference.
fullPath string Yes Normalized absolute path or virtual source identifier.

Returns

A new ScriptSourceReference instance.

ScriptSourceReference(string baseDirectory, string fullPath, string modulePath)

Creates a ScriptSourceReference instance.

ScriptSourceReference(string baseDirectory, string fullPath, string modulePath)

Parameters

Name Type Required Description
baseDirectory string Yes Resolver root associated with the source reference.
fullPath string Yes Normalized absolute path or virtual source identifier.
modulePath string Yes Resolver-relative source path used for display and source-relative behavior. It is not a module name or identity.

Returns

A new ScriptSourceReference instance.

Properties

BaseDirectory

Resolver root that should read this reference.

string BaseDirectory

Parameters

None.

Returns

Returns string.

FullPath

Normalized absolute file path or virtual source identifier.

string FullPath

Parameters

None.

Returns

Returns string.

ModulePath

Resolver-relative source path used for display and source-relative behavior. It is not a module name or registry identity.

string ModulePath

Parameters

None.

Returns

Returns string.

Clone this wiki locally