63 public override bool Has(
string path)
65 string fullPath =
GetPath(path);
71 public override string GetHash(
string path)
73 string fullPath =
GetPath(path);
75 return "file://" + fullPath;
79 public override IEnumerable<BadObject>
Get(
string path)
81 string fullPath =
GetPath(path);
88 foreach (
BadObject o
in ctx.Execute(parsed))
93 yield
return ctx.Scope.GetExports();
Exposes the BadScript Runtime Functionality to Consumers.
BadExecutionContext CreateContext(string workingDirectory)
Creates a new Context with the configured Options.
static IEnumerable< BadExpression > ParseFile(string file, IFileSystem? fileSystem=null)
Parses the specified script file.
The Execution Context. Every execution of a script needs a context the script is running in....
Defines the shape of the import handler for the module importer.
Imports a module from a local path.
readonly string m_WorkingDirectory
The Working Directory.
string GetPath(string path)
Returns the full path for the specified path.
BadLocalPathImportHandler(BadRuntime runtime, string workingDirectory, IFileSystem mFileSystem)
Creates a new BadLocalPathImportHandler instance.
override bool Has(string path)
override IEnumerable< BadObject > Get(string path)
readonly BadRuntime m_Runtime
The Runtime.
override bool IsTransient()
override string GetHash(string path)
readonly IFileSystem m_FileSystem
The File System.
The Base Class for all BadScript Objects.
Provides runtime settings.
static T Instance
Returns the Instance of the Settings Provider.
Defines the interface for a file system.
bool IsFile(string path)
Returns true if the given path is a file.
string GetFullPath(string path)
Returns the full path of the given path.
Contains IO Implementation for the BadScript2 Runtime.
Contains the Expressions for the BadScript2 Language.
Contains the Runtime Objects.
Contains Runtime Settings Objects.