![]() |
BadScript 2
|
Implements the Html Context for the Transformation Process. More...
Public Member Functions | |
| BadHtmlContext (HtmlNode inputNode, HtmlNode outputNode, BadExecutionContext executionContext, string filePath, string source, BadHtmlTemplateOptions options, IFileSystem fileSystem) | |
| Constructs a new Html Context. | |
| BadHtmlContext | CreateChild (HtmlNode inputNode, HtmlNode outputNode, BadExecutionContext? executionContext=null) |
| Creates a child context with the specified input, output node and optional execution context. | |
| BadSourcePosition | CreateAttributePosition (HtmlAttribute attribute) |
| Creates the Source Position of the specified Attribute. | |
| BadSourcePosition | CreateInnerPosition () |
| Creates the Source Position of the current Input Nodes Inner Content. | |
| BadSourcePosition | CreateOuterPosition () |
| Creates the Source Position of the current Input Nodes Outer Content. | |
| BadExpression | ParseSingle (string code, BadSourcePosition pos) |
| Parses a single Expression from the specified code and returns it with its position set to the specified position. | |
| BadExpression[] | Parse (string code, BadSourcePosition pos) |
| Parses the specified code and returns the expressions with their positions set to the specified position. | |
| BadObject | Execute (IEnumerable< BadExpression > expressions, BadSourcePosition position) |
| Executes the specified expressions. | |
| BadObject | Execute (BadExpression expression, BadSourcePosition position) |
| Executes the specified expression. | |
| BadObject | ParseAndExecute (string code, BadSourcePosition pos) |
| Parses and executes the specified code. | |
| BadObject | ParseAndExecuteSingle (string code, BadSourcePosition pos) |
| Parses and executes the specified code and returns the result of the last expression. | |
Public Attributes | |
| readonly BadExecutionContext | ExecutionContext |
| The Execution Context that is used to evaluate badscript code. | |
| readonly string | FilePath |
| The File Path of the Template. | |
| readonly HtmlNode | InputNode |
| The Current Input Node. | |
| readonly BadHtmlTemplateOptions | Options |
| The Html Template Options. | |
| readonly HtmlNode | OutputNode |
| The Current Output Node. | |
| readonly string | Source |
| The Source Code of the Template. | |
Properties | |
| IFileSystem | FileSystem [get] |
| The Filesystem of the Current Template Context. | |
| HtmlDocument | InputDocument [get] |
| The Input Document. | |
| HtmlDocument | OutputDocument [get] |
| The Output Document. | |
Static Private Member Functions | |
| static IEnumerable< BadExpression > | VisitAll (IEnumerable< BadExpression > expressions) |
| Returns an enumeration of all expressions in the specified expressions and their descendants. | |
Implements the Html Context for the Transformation Process.
Definition at line 24 of file BadHtmlContext.cs.
| BadHtml.BadHtmlContext.BadHtmlContext | ( | HtmlNode | inputNode, |
| HtmlNode | outputNode, | ||
| BadExecutionContext | executionContext, | ||
| string | filePath, | ||
| string | source, | ||
| BadHtmlTemplateOptions | options, | ||
| IFileSystem | fileSystem | ||
| ) |
Constructs a new Html Context.
| inputNode | The Input Node |
| outputNode | The Output Node |
| executionContext | The Execution Context |
| filePath | The File Path of the Template |
| source | The Source of the Template |
| options | The Html Template Options |
| fileSystem | The Filesystem of the Current Template Context |
Definition at line 66 of file BadHtmlContext.cs.
| BadSourcePosition BadHtml.BadHtmlContext.CreateAttributePosition | ( | HtmlAttribute | attribute | ) |
Creates the Source Position of the specified Attribute.
| attribute | The Attribute |
Definition at line 127 of file BadHtmlContext.cs.
| BadHtmlContext BadHtml.BadHtmlContext.CreateChild | ( | HtmlNode | inputNode, |
| HtmlNode | outputNode, | ||
| BadExecutionContext? | executionContext = null |
||
| ) |
Creates a child context with the specified input, output node and optional execution context.
| inputNode | The Input Node |
| outputNode | The Output Node |
| executionContext | The Optional Execution Context. If not specified, the context will be inherited from this instance |
Definition at line 108 of file BadHtmlContext.cs.
| BadSourcePosition BadHtml.BadHtmlContext.CreateInnerPosition | ( | ) |
Creates the Source Position of the current Input Nodes Inner Content.
Definition at line 136 of file BadHtmlContext.cs.
| BadSourcePosition BadHtml.BadHtmlContext.CreateOuterPosition | ( | ) |
Creates the Source Position of the current Input Nodes Outer Content.
Definition at line 145 of file BadHtmlContext.cs.
| BadObject BadHtml.BadHtmlContext.Execute | ( | BadExpression | expression, |
| BadSourcePosition | position | ||
| ) |
Executes the specified expression.
| expression | The Expression |
| position | The Source Position of the Expression |
| BadRuntimeErrorException | Gets raised if the execution failed. |
| BadRuntimeException | Gets raised if the execution failed. |
Definition at line 275 of file BadHtmlContext.cs.
| BadObject BadHtml.BadHtmlContext.Execute | ( | IEnumerable< BadExpression > | expressions, |
| BadSourcePosition | position | ||
| ) |
Executes the specified expressions.
| expressions | The Expressions |
| position | The Source Position of the Expressions |
| BadRuntimeErrorException | Gets raised if the execution failed. |
Definition at line 253 of file BadHtmlContext.cs.
| BadExpression[] BadHtml.BadHtmlContext.Parse | ( | string | code, |
| BadSourcePosition | pos | ||
| ) |
Parses the specified code and returns the expressions with their positions set to the specified position.
| code | The Bad Script Source Code |
| pos | The Source Position of the Code |
| BadSourceReaderException | Gets raised if the Source Could not be parsed. |
Definition at line 210 of file BadHtmlContext.cs.
| BadObject BadHtml.BadHtmlContext.ParseAndExecute | ( | string | code, |
| BadSourcePosition | pos | ||
| ) |
Parses and executes the specified code.
| code | The Bad Script Source Code |
| pos | The Source Position of the Code |
Definition at line 300 of file BadHtmlContext.cs.
| BadObject BadHtml.BadHtmlContext.ParseAndExecuteSingle | ( | string | code, |
| BadSourcePosition | pos | ||
| ) |
Parses and executes the specified code and returns the result of the last expression.
| code | The Bad Script Source Code |
| pos | The Source Position of the Code |
Definition at line 313 of file BadHtmlContext.cs.
| BadExpression BadHtml.BadHtmlContext.ParseSingle | ( | string | code, |
| BadSourcePosition | pos | ||
| ) |
Parses a single Expression from the specified code and returns it with its position set to the specified position.
| code | The Bad Script Source Code |
| pos | The Source Position of the Code |
| BadSourceReaderException | Gets raised if the Source Could not be parsed. |
Definition at line 167 of file BadHtmlContext.cs.
|
staticprivate |
Returns an enumeration of all expressions in the specified expressions and their descendants.
| expressions | The Expression Enumeration |
Definition at line 155 of file BadHtmlContext.cs.
| readonly BadExecutionContext BadHtml.BadHtmlContext.ExecutionContext |
The Execution Context that is used to evaluate badscript code.
Definition at line 29 of file BadHtmlContext.cs.
| readonly string BadHtml.BadHtmlContext.FilePath |
The File Path of the Template.
Definition at line 34 of file BadHtmlContext.cs.
| readonly HtmlNode BadHtml.BadHtmlContext.InputNode |
The Current Input Node.
Definition at line 39 of file BadHtmlContext.cs.
| readonly BadHtmlTemplateOptions BadHtml.BadHtmlContext.Options |
The Html Template Options.
Definition at line 44 of file BadHtmlContext.cs.
| readonly HtmlNode BadHtml.BadHtmlContext.OutputNode |
The Current Output Node.
Definition at line 49 of file BadHtmlContext.cs.
| readonly string BadHtml.BadHtmlContext.Source |
The Source Code of the Template.
Definition at line 54 of file BadHtmlContext.cs.
|
get |
The Filesystem of the Current Template Context.
Definition at line 86 of file BadHtmlContext.cs.
|
get |
The Input Document.
Definition at line 91 of file BadHtmlContext.cs.
|
get |
The Output Document.
Definition at line 96 of file BadHtmlContext.cs.