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
Functions
Gets the registered function symbols.
public IReadOnlyCollection<FunctionSymbol> Functions { get; }
Property Value
Globals
Gets the registered global symbols.
public IReadOnlyCollection<GlobalSymbol> Globals { get; }
Property Value
LanguageVersion
Gets the language version.
public LanguageVersion LanguageVersion { get; }
Property Value
Types
Gets the registered structured types.
public IReadOnlyCollection<ObjectTypeSymbol> Types { get; }
Property Value
Methods
TryGetFunction(string, out FunctionSymbol?)
Gets a function symbol by its language name.
public bool TryGetFunction(string name, out FunctionSymbol? function)
Parameters
namestringThe language name.
functionFunctionSymbolWhen this method returns, contains the function symbol, if found.
Returns
- bool
trueif 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
idstringThe provider identifier.
functionFunctionSymbolWhen this method returns, contains the function symbol, if found.
Returns
- bool
trueif 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
namestringThe language name.
globalGlobalSymbolWhen this method returns, contains the global symbol, if found.
Returns
- bool
trueif 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
idstringThe provider identifier.
globalGlobalSymbolWhen this method returns, contains the global symbol, if found.
Returns
- bool
trueif 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
namestringThe language name.
typeObjectTypeSymbolWhen this method returns, contains the type, if found.
Returns
- bool
trueif a type with the specified name was found; otherwise,false.