C# 클래스 Jint.JintEngine

파일 보기 프로젝트 열기: splhack/unity-jint 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
visitor ExecutionVisitor

공개 메소드들

메소드 설명
AddPermission ( IPermission perm ) : JintEngine
CallFunction ( JsFunction function ) : object
CallFunction ( string name ) : object
Compile ( string source, bool debugInformation ) : Program
DisableSecurity ( ) : JintEngine
EnableSecurity ( ) : JintEngine
EscapteStringLiteral ( string value ) : string

Escapes a JavaScript string literal

HasErrors ( string script, string &errors ) : bool

Pre-compiles the expression in order to check syntax errors. If errors are detected, the Error property contains the message.

Load ( Stream s ) : JintEngine
Load ( JintEngine engine, Stream s ) : void
Run ( Program program ) : object

Runs a set of JavaScript statements and optionally returns a value if return is called

Run ( Program program, bool unwrap ) : object

Runs a set of JavaScript statements and optionally returns a value if return is called

Run ( TextReader reader ) : object

Runs a set of JavaScript statements and optionally returns a value if return is called

Run ( TextReader reader, bool unwrap ) : object

Runs a set of JavaScript statements and optionally returns a value if return is called

Run ( string script ) : object

Runs a set of JavaScript statements and optionally returns a value if return is called

Run ( string script, bool unwrap ) : object

Runs a set of JavaScript statements and optionally returns a value if return is called

Save ( Stream s ) : void
SetDebugMode ( bool debugMode ) : JintEngine
SetFunction ( string name, Delegate function ) : JintEngine
SetFunction ( string name, JsFunction function ) : JintEngine
SetMaxRecursions ( int maxRecursions ) : JintEngine

Defines the max allowed number of recursions in the script

SetParameter ( string name, DateTime value ) : JintEngine

Defines an external DateTime value to be available inside the script

SetParameter ( string name, bool value ) : JintEngine

Defines an external Boolean value to be available inside the script

SetParameter ( string name, double value ) : JintEngine

Defines an external Double value to be available inside the script

SetParameter ( string name, int value ) : JintEngine

Defines an external Int32 value to be available inside the script

SetParameter ( string name, string value ) : JintEngine

Defines an external String instance to be available inside the script

보호된 메소드들

메소드 설명
OnBreak ( object sender, DebugInformation info ) : void
OnStep ( object sender, DebugInformation info ) : void

비공개 메소드들

메소드 설명
JintEngine ( )
JintEngine ( Jint.Options options )

메소드 상세

AddPermission() 공개 메소드

public AddPermission ( IPermission perm ) : JintEngine
perm IPermission
리턴 JintEngine

CallFunction() 공개 메소드

public CallFunction ( JsFunction function ) : object
function JsFunction
리턴 object

CallFunction() 공개 메소드

public CallFunction ( string name ) : object
name string
리턴 object

Compile() 공개 정적인 메소드

public static Compile ( string source, bool debugInformation ) : Program
source string
debugInformation bool
리턴 Program

DisableSecurity() 공개 메소드

public DisableSecurity ( ) : JintEngine
리턴 JintEngine

EnableSecurity() 공개 메소드

public EnableSecurity ( ) : JintEngine
리턴 JintEngine

EscapteStringLiteral() 공개 정적인 메소드

Escapes a JavaScript string literal
public static EscapteStringLiteral ( string value ) : string
value string The string literal to espace
리턴 string

HasErrors() 공개 정적인 메소드

Pre-compiles the expression in order to check syntax errors. If errors are detected, the Error property contains the message.
public static HasErrors ( string script, string &errors ) : bool
script string
errors string
리턴 bool

Load() 공개 정적인 메소드

public static Load ( Stream s ) : JintEngine
s Stream
리턴 JintEngine

Load() 공개 정적인 메소드

public static Load ( JintEngine engine, Stream s ) : void
engine JintEngine
s Stream
리턴 void

OnBreak() 보호된 메소드

protected OnBreak ( object sender, DebugInformation info ) : void
sender object
info DebugInformation
리턴 void

OnStep() 보호된 메소드

protected OnStep ( object sender, DebugInformation info ) : void
sender object
info DebugInformation
리턴 void

Run() 공개 메소드

Runs a set of JavaScript statements and optionally returns a value if return is called
public Run ( Program program ) : object
program Program The expression tree to execute
리턴 object

Run() 공개 메소드

Runs a set of JavaScript statements and optionally returns a value if return is called
public Run ( Program program, bool unwrap ) : object
program Program The expression tree to execute
unwrap bool Whether to unwrap the returned value to a CLR instance. True by default.
리턴 object

Run() 공개 메소드

Runs a set of JavaScript statements and optionally returns a value if return is called
public Run ( TextReader reader ) : object
reader TextReader The TextReader to read script from
리턴 object

Run() 공개 메소드

Runs a set of JavaScript statements and optionally returns a value if return is called
public Run ( TextReader reader, bool unwrap ) : object
reader TextReader The TextReader to read script from
unwrap bool Whether to unwrap the returned value to a CLR instance. True by default.
리턴 object

Run() 공개 메소드

Runs a set of JavaScript statements and optionally returns a value if return is called
public Run ( string script ) : object
script string The script to execute
리턴 object

Run() 공개 메소드

Runs a set of JavaScript statements and optionally returns a value if return is called
public Run ( string script, bool unwrap ) : object
script string The script to execute
unwrap bool Whether to unwrap the returned value to a CLR instance. True by default.
리턴 object

Save() 공개 메소드

public Save ( Stream s ) : void
s Stream
리턴 void

SetDebugMode() 공개 메소드

public SetDebugMode ( bool debugMode ) : JintEngine
debugMode bool
리턴 JintEngine

SetFunction() 공개 메소드

public SetFunction ( string name, Delegate function ) : JintEngine
name string
function Delegate
리턴 JintEngine

SetFunction() 공개 메소드

public SetFunction ( string name, JsFunction function ) : JintEngine
name string
function JsFunction
리턴 JintEngine

SetMaxRecursions() 공개 메소드

Defines the max allowed number of recursions in the script
public SetMaxRecursions ( int maxRecursions ) : JintEngine
maxRecursions int
리턴 JintEngine

SetParameter() 공개 메소드

Defines an external DateTime value to be available inside the script
public SetParameter ( string name, DateTime value ) : JintEngine
name string Local name of the DateTime value during the execution of the script
value DateTime Available DateTime value
리턴 JintEngine

SetParameter() 공개 메소드

Defines an external Boolean value to be available inside the script
public SetParameter ( string name, bool value ) : JintEngine
name string Local name of the Boolean value during the execution of the script
value bool Available Boolean value
리턴 JintEngine

SetParameter() 공개 메소드

Defines an external Double value to be available inside the script
public SetParameter ( string name, double value ) : JintEngine
name string Local name of the Double value during the execution of the script
value double Available Double value
리턴 JintEngine

SetParameter() 공개 메소드

Defines an external Int32 value to be available inside the script
public SetParameter ( string name, int value ) : JintEngine
name string Local name of the Int32 value during the execution of the script
value int Available Int32 value
리턴 JintEngine

SetParameter() 공개 메소드

Defines an external String instance to be available inside the script
public SetParameter ( string name, string value ) : JintEngine
name string Local name of the String instance during the execution of the script
value string Available String instance
리턴 JintEngine

프로퍼티 상세

visitor 보호되어 있는 프로퍼티

protected ExecutionVisitor,Jint visitor
리턴 ExecutionVisitor