C# Class Myslik.Utils.ScriptEngine

Represents a Windows Script Engine such as JScript, VBScript, etc.
Inheritance: IDisposable
Mostra file Open project: Myslik/csharp-ember-handlebars Class Usage Examples

Public Methods

Method Description
Eval ( string expression ) : object

Evaluates an expression.

Eval ( string language, string expression ) : object

Evaluates an expression using the specified language.

Parse ( string text ) : ParsedScript

Parses the specified text and returns an object that can be used for evaluation.

ScriptEngine ( string language ) : System

Initializes a new instance of the ScriptEngine class.

SetNamedItem ( string name, object value ) : void

Adds the name of a root-level item to the scripting engine's name space.

Private Methods

Method Description
IDisposable ( ) : void
Parse ( string text, bool expression ) : object

Method Details

Eval() public method

Evaluates an expression.
public Eval ( string expression ) : object
expression string The expression. May not be null.
return object

Eval() public static method

Evaluates an expression using the specified language.
public static Eval ( string language, string expression ) : object
language string The language.
expression string The expression. May not be null.
return object

Parse() public method

Parses the specified text and returns an object that can be used for evaluation.
public Parse ( string text ) : ParsedScript
text string The text to parse.
return ParsedScript

ScriptEngine() public method

Initializes a new instance of the ScriptEngine class.
public ScriptEngine ( string language ) : System
language string The scripting language. Standard Windows Script engines names are 'jscript' or 'vbscript'.
return System

SetNamedItem() public method

Adds the name of a root-level item to the scripting engine's name space.
public SetNamedItem ( string name, object value ) : void
name string The name. May not be null.
value object The value. It must be a ComVisible object.
return void