Summary
A common interface to a JavaScript engine. Every JavaScript engine is
obtained from a
Wyam.Common.JavaScript.IJavaScriptEnginePool
and will be returned to the
pool when it is disposed. Therefore, you must dispose the engine when
you are done with it.
- Assembly
- Wyam
.Testing .JavaScript .dll - Namespace
- Wyam
.Testing .JavaScript - Interfaces
-
- IJavaScriptEngine
- IDisposable
- Base Types
-
- Object
graph BT
Type-->Base0["Object"]
Type-.->Interface0["IJavaScriptEngine"]
click Interface0 "/api/Wyam.Common.JavaScript/IJavaScriptEngine"
Type-.->Interface1["IDisposable"]
Type["TestJsEngine"]
class Type type-node
Syntax
public class TestJsEngine : IJavaScriptEngine, IDisposable
Constructors
Name | Summary |
---|---|
TestJsEngine |
|
TestJsEngine |
Properties
Name | Value | Summary |
---|---|---|
Name | string |
Gets the name of JavaScript engine.
|
Supports |
bool |
Gets a value that indicates if the JavaScript engine supports garbage collection.
|
Supports |
bool |
Gets a value that indicates if the JavaScript engine supports script interruption.
|
Supports |
bool |
Gets a value that indicates if the JavaScript engine supports script pre-compilation.
|
Version | string |
Gets the version of original JavaScript engine.
|
Methods
Name | Value | Summary |
---|---|---|
CallFunction |
Object |
Calls a JavaScript function.
|
CallFunction |
T |
Calls a JavaScript function.
|
CollectGarbage |
void |
Performs a full garbage collection.
|
Dispose |
void | |
EmbedHostObject |
void |
Embeds a host object to script code.
|
EmbedHostType |
void |
Embeds a host type to script code.
|
Evaluate |
Object |
Evaluates an expression.
|
Evaluate |
Object |
Evaluates an expression.
|
Evaluate |
T |
Evaluates an expression.
|
Evaluate |
T |
Evaluates an expression.
|
Execute |
void |
Executes a pre-compiled script.
|
Execute |
void |
Executes JavaScript code.
|
Execute |
void |
Executes a JavaScript code.
|
ExecuteFile |
void |
Executes code from JavaScript file.
|
ExecuteResource |
void |
Executes code from embedded JavaScript resource.
|
ExecuteResource |
void |
Executes code from embedded JavaScript resource.
|
GetVariableValue |
Object |
Gets the value of variable.
|
GetVariableValue |
T |
Gets the value of variable.
|
HasVariable |
bool |
Checks for the existence of a variable.
|
Interrupt |
void |
Interrupts script execution and causes the JavaScript engine to throw an exception.
|
Precompile |
I |
Creates a pre-compiled script from JavaScript code.
|
Precompile |
I |
Creates a pre-compiled script from JavaScript code.
|
PrecompileFile |
I |
Creates a pre-compiled script from JavaScript file.
|
PrecompileResource |
I |
Creates a pre-compiled script from embedded JavaScript resource.
|
PrecompileResource |
I |
Creates a pre-compiled script from embedded JavaScript resource
|
RemoveVariable |
void |
Removes a variable.
|
SetVariableValue |
void |
Sets the value of variable.
|