15 private readonly List<BadImportHandler>
m_Handlers =
new List<BadImportHandler>();
63 public IEnumerable<BadObject>
Get(
string path)
65 for (
int i =
m_Handlers.Count - 1; i >= 0; i--)
68 string hash = handler.
GetHash(path);
76 if (handler.
Has(path))
78 IEnumerable<BadObject> result = handler.
Get(path);
Gets thrown by the runtime.
Defines the shape of the import handler for the module importer.
IEnumerable< BadObject > Get(string path)
Imports a module from the specified path.
bool Has(string path)
Returns true if the specified path is available.
string GetHash(string path)
Returns a unique hash for the specified path.
The Class that manages the importing of modules.
BadModuleImporter Clone(bool onlyTransient=true)
BadModuleImporter AddHandler(BadImportHandler handler)
Adds a new Import Handler to the Importer.
readonly BadModuleStore m_Store
The Module Store instance.
readonly List< BadImportHandler > m_Handlers
The List of Import Handlers.
IEnumerable< BadObject > Get(string path)
Imports a module from the specified path.
BadModuleImporter(BadModuleStore store)
Creates a new BadModuleImporter.
Is the store for all loaded modules.
void Cache(string hash, BadObject module)
Cache the specified module.
bool IsCached(string hash)
Returns true if the module is cached.
BadObject Get(string hash)
Returns the module with the specified hash.
The Base Class for all BadScript Objects.
static readonly BadObject Null
The Null Value for the BadScript Language.
Provides settings for the module system.
static T Instance
Returns the Instance of the Settings Provider.
Contains the Error Objects for the BadScript2 Language.
Contains the Runtime Objects.
Contains Runtime Settings Objects.