Table of Contents

Class EnvironmentSchema

Namespace
MuLang.Core.Environment
Assembly
MuLang.Core.dll

Represents the types, globals, and functions available to MuLang code.

public sealed class EnvironmentSchema
Inheritance
EnvironmentSchema
Inherited Members

Properties

Fingerprint

Gets the stable fingerprint of the schema.

public EnvironmentFingerprint Fingerprint { get; }

Property Value

EnvironmentFingerprint

Functions

Gets the registered function symbols.

public IReadOnlyCollection<FunctionSymbol> Functions { get; }

Property Value

IReadOnlyCollection<FunctionSymbol>

Globals

Gets the registered global symbols.

public IReadOnlyCollection<GlobalSymbol> Globals { get; }

Property Value

IReadOnlyCollection<GlobalSymbol>

LanguageVersion

Gets the language version.

public LanguageVersion LanguageVersion { get; }

Property Value

LanguageVersion

Types

Gets the registered structured types.

public IReadOnlyCollection<ObjectTypeSymbol> Types { get; }

Property Value

IReadOnlyCollection<ObjectTypeSymbol>

Methods

TryGetFunction(string, out FunctionSymbol?)

Gets a function symbol by its language name.

public bool TryGetFunction(string name, out FunctionSymbol? function)

Parameters

name string

The language name.

function FunctionSymbol

When this method returns, contains the function symbol, if found.

Returns

bool

true if a function with the specified name was found; otherwise, false.

TryGetFunctionById(string, out FunctionSymbol?)

Gets a function symbol by its provider identifier.

public bool TryGetFunctionById(string id, out FunctionSymbol? function)

Parameters

id string

The provider identifier.

function FunctionSymbol

When this method returns, contains the function symbol, if found.

Returns

bool

true if a function with the specified identifier was found; otherwise, false.

TryGetGlobal(string, out GlobalSymbol?)

Gets a global symbol by its language name.

public bool TryGetGlobal(string name, out GlobalSymbol? global)

Parameters

name string

The language name.

global GlobalSymbol

When this method returns, contains the global symbol, if found.

Returns

bool

true if a global with the specified name was found; otherwise, false.

TryGetGlobalById(string, out GlobalSymbol?)

Gets a global symbol by its provider identifier.

public bool TryGetGlobalById(string id, out GlobalSymbol? global)

Parameters

id string

The provider identifier.

global GlobalSymbol

When this method returns, contains the global symbol, if found.

Returns

bool

true if a global with the specified identifier was found; otherwise, false.

TryGetType(string, out ObjectTypeSymbol?)

Gets a structured type by its language name.

public bool TryGetType(string name, out ObjectTypeSymbol? type)

Parameters

name string

The language name.

type ObjectTypeSymbol

When this method returns, contains the type, if found.

Returns

bool

true if a type with the specified name was found; otherwise, false.