C# Class ExoWeb.Templates.JavaScript.ScriptFunction

Represents a script expression that can be evaluated like a function
Mostra file Open project: vc3/ExoWeb

Public Methods

Method Description
Evaluate ( IEnumerable arguments, Marshaler marshaler ) : object
ScriptFunction ( IScriptEngineFactory engineFactory, IEnumerable argumentNames, string expression ) : System

Creates a function based on an expression. Ex: "x + 1"

ScriptFunction ( IScriptEngineFactory engineFactory, IEnumerable argumentNames, string expression, bool addReturnStatement ) : System

Creates a function based on an expression. Ex: "x + 1"

Private Methods

Method Description
EnsureCompiled ( ScriptEngine engine ) : void

Method Details

Evaluate() public method

public Evaluate ( IEnumerable arguments, Marshaler marshaler ) : object
arguments IEnumerable
marshaler Marshaler
return object

ScriptFunction() public method

Creates a function based on an expression. Ex: "x + 1"
public ScriptFunction ( IScriptEngineFactory engineFactory, IEnumerable argumentNames, string expression ) : System
engineFactory IScriptEngineFactory
argumentNames IEnumerable
expression string
return System

ScriptFunction() public method

Creates a function based on an expression. Ex: "x + 1"
public ScriptFunction ( IScriptEngineFactory engineFactory, IEnumerable argumentNames, string expression, bool addReturnStatement ) : System
engineFactory IScriptEngineFactory
argumentNames IEnumerable
expression string
addReturnStatement bool
return System