C# 클래스 Jurassic.Compiler.ObjectScope

Represents a scope which is backed by the properties of an object.
상속: Scope
파일 보기 프로젝트 열기: paulbartrum/jurassic

Private Properties

프로퍼티 타입 설명
CreateGlobalScope ObjectScope
CreateWithScope ObjectScope
GenerateScopeCreation void
ObjectScope System

공개 메소드들

메소드 설명
CreateRuntimeScope ( Scope parentScope, Library scopeObject, bool providesImplicitThisValue, bool canDeclareVariables ) : ObjectScope

Creates a new object scope for use inside a with statement.

Creates a new object scope for use at runtime.

Delete ( string variableName ) : bool

Deletes the variable from the scope.

GetValue ( string variableName ) : object

Returns the value of the given variable.

HasValue ( string variableName ) : bool

Returns true if the given variable exists in this scope.

SetValue ( string variableName, object value ) : void

Sets the value of the given variable.

비공개 메소드들

메소드 설명
CreateGlobalScope ( Library globalObject ) : ObjectScope

Creates a new global object scope.

CreateWithScope ( Scope parentScope, Jurassic.Compiler.Expression scopeObject ) : ObjectScope

Creates a new object scope for use inside a with statement.

GenerateScopeCreation ( ILGenerator generator, OptimizationInfo optimizationInfo ) : void

Generates code that creates a new scope.

ObjectScope ( Scope parentScope ) : System

Creates a new ObjectScope instance.

메소드 상세

CreateRuntimeScope() 공개 정적인 메소드

Creates a new object scope for use inside a with statement. Creates a new object scope for use at runtime.
public static CreateRuntimeScope ( Scope parentScope, Library scopeObject, bool providesImplicitThisValue, bool canDeclareVariables ) : ObjectScope
parentScope Scope A reference to the parent scope. Can not be null.
scopeObject Library An expression that evaluates to the object to use.
providesImplicitThisValue bool Indicates whether an implicit "this" value is /// supplied to function calls in this scope.
canDeclareVariables bool Indicates whether variables can be declared within /// the scope.
리턴 ObjectScope

Delete() 공개 메소드

Deletes the variable from the scope.
public Delete ( string variableName ) : bool
variableName string The name of the variable.
리턴 bool

GetValue() 공개 메소드

Returns the value of the given variable.
public GetValue ( string variableName ) : object
variableName string The name of the variable.
리턴 object

HasValue() 공개 메소드

Returns true if the given variable exists in this scope.
public HasValue ( string variableName ) : bool
variableName string The name of the variable to check.
리턴 bool

SetValue() 공개 메소드

Sets the value of the given variable.
public SetValue ( string variableName, object value ) : void
variableName string The name of the variable.
value object The new value of the variable.
리턴 void