C# Класс Jurassic.Compiler.ObjectScope

Represents a scope which is backed by the properties of an object.
Наследование: Scope
Показать файл Открыть проект

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