42 rootDir = rootDir.Remove(rootDir.Length - 1, 1);
57 private static Task<int>
Main(
string[] args)
61 if (args.Contains(
"--logmask"))
63 int idx = Array.IndexOf(args,
"--logmask");
65 if (idx + 1 < args.Length)
67 string maskStr = args[idx + 1];
69 args = args.Where((_, i) => i != idx && i != idx + 1).ToArray();
76 .LoadConsoleSettings()
99 return runner.
Run(args);
Exposes the BadScript Runtime Functionality to Consumers.
BadRuntime UseLogMask(params BadLogMask[] mask)
Configures the Runtime to use the specified log masks.
BadRuntime UseConsoleLogWriter()
Configures the Runtime to use the default log writer implementation(log to console)
BadRuntime UseLocalModules(IFileSystem? fs=null)
Registers the Local Path Handler to the Module Importer.
BadRuntime LoadSettings(string settingsFile, IFileSystem? fileSystem=null)
Loads the specified settings file.
Implements a Mask for Log Messages.
static readonly BadLogMask None
Static Helper for the "None" Mask.
static BadLogMask GetMask(params BadLogMask[] masks)
Returns a combined mask of all masks provided.
Entrypoint for the Console Application.
const string SETTINGS_FILE
Defines the Settings file.
static BadRuntime LoadConsoleSettings(this BadRuntime runtime)
Loads the Settings.
static Task< int > Main(string[] args)
Entrypoint.
Static class that contains all the directories used by the console.
static string DataDirectory
The Data Directory.
Class that can register console systems and run them.
Task< int > Run(string[] args)
Runs a system with the specified arguments.
Runs the Html Template Engine.
Runs the Html Template Engine.
Default Run System Is used to enable running scripts by simply typing "bs my/path/to/script....
Connects to a remote console.
Runs one or more BadScript scripts.
Prints a specific setting to the console.
Runs unit tests using NUnitLite.
Public interface for the filesystem abstraction of the BadScript Engine.
static IFileSystem Instance
File System implementation.
Public Api for the Settings System.
void SetProperty(string propertyName, BadSettings value, bool invokeOnChange=true)
Sets the Property with the given Name.
Helper class that can be used to automatically load a settings object from a file.
static BadSettings RootSettings
Returns the Root Settings Object.
string GetStartupDirectory()
The Startup Directory of the Application.
Contains Logging system for the BadScript Runtime.
Contains the 'html' console command implementation.
Contains the 'html' console command implementation.
Contains the 'run' console command implementation.
Contains the 'settings' console command implementation.
Contains the 'test' command implementation.
Contains the Core Functionality of the Console Application.
Contains the Entrypoint for the Console Application.
Contains IO Implementation for the BadScript2 Runtime.
Contains Common Interop Extensions and APIs for the BadScript2 Runtime.
Contains Compression Extensions and APIs for the BadScript2 Runtime.
Contains HTML Extensions and APIs for the BadScript2 Runtime.
Contains IO Extensions and APIs for the BadScript2 Runtime.
Contains JSON Extensions and APIs for the BadScript2 Runtime.
Contains Linq Extensions and APIs for the BadScript2 Runtime.
Contains Network Hosting Extensions and APIs for the BadScript2 Runtime.
Contains Networking Extensions and APIs for the BadScript2 Runtime.
Contains the Settings Implementation.