C# Class Myslik.Utils.ScriptEngine

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

Méthodes publiques

Méthode 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

Méthode Description
IDisposable ( ) : void
Parse ( string text, bool expression ) : object

Method Details

Eval() public méthode

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

Eval() public static méthode

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.
Résultat object

Parse() public méthode

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.
Résultat ParsedScript

ScriptEngine() public méthode

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'.
Résultat System

SetNamedItem() public méthode

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.
Résultat void