83 HtmlDocument input =
new HtmlDocument();
84 input.OptionUseIdAttribute =
true;
88 HtmlDocument output =
new HtmlDocument();
89 output.OptionUseIdAttribute =
true;
100 executionContext.
Scope,
105 foreach (HtmlNode node
in input.DocumentNode.ChildNodes)
124 return RunTemplate(model, options, caller).DocumentNode.OuterHtml;
Implements the Html Context for the Transformation Process.
Implements a Html Template.
static BadHtmlTemplate Create(string file, IFileSystem? fileSystem=null)
Creates a new Template.
void Reload()
Reloads the Template Source.
HtmlDocument RunTemplate(object? model=null, BadHtmlTemplateOptions? options=null, BadScope? caller=null)
Runs the Template with the specified arguments.
readonly IFileSystem m_FileSystem
The Filesystem used to load the template.
BadHtmlTemplate(string filePath, IFileSystem fileSystem)
Constructs a new Template.
string GetSource()
Returns the source code of the template. Loads the source code if it is not loaded yet.
string Run(object? model=null, BadHtmlTemplateOptions? options=null, BadScope? caller=null)
Runs the Template with the specified arguments.
string? m_Source
The Source code of the Template(gets loaded on first template run)
string FilePath
The Filepath of the Template.
Options for the Html Template Engine.
Exposes the BadScript Runtime Functionality to Consumers.
Public interface for the filesystem abstraction of the BadScript Engine.
static IFileSystem Instance
File System implementation.
The Execution Context. Every execution of a script needs a context the script is running in....
BadScope Scope
The Root Scope of the Context.
Implements the Scope for the Script Engine.
void SetCaller(BadScope? caller)
Sets the Caller of the Scope.
void DefineVariable(string name, BadObject value, BadScope? caller=null, BadPropertyInfo? info=null, BadObject[]? attributes=null)
Defines a new Variable in the current scope.
The Base Class for all BadScript Objects.
Stores Meta Information about a Property.
The Any Prototype, Base type for all types.
static readonly BadAnyPrototype Instance
The Instance of the BadAnyPrototype.
Defines the interface for a file system.
string GetFullPath(string path)
Returns the full path of the given path.
A Html Template Generator based on BadScript2.
Contains IO Implementation for the BadScript2 Runtime.
Contains Runtime Type Objects.
Contains the Runtime Objects.
Contains the Runtime Implementation.
The main namespace for the BadScript2 Language.