Skip to content

API Host ScriptSourceReference

Liu.Yandong.Hanks edited this page Aug 21, 2026 · 3 revisions

ScriptSourceReference

Stable identity returned by a resolver after an import/include path is resolved.

Namespace: AuroraScript.Core. Kind: struct.

Back to .NET Host API Reference

Overview

Stable identity returned by a resolver after an import/include path is resolved.

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 Module-relative path used by compiler and runtime names.

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

Module-relative path used by compiler/runtime names.

string ModulePath

Parameters

None.

Returns

Returns string.

Clone this wiki locally