C# Класс ScriptNET.Runtime.ScriptScope

Script Scope represents a tree of local scopes. Scopes stores variables and types tables. Run-time queries ScriptScope through ScriptContext for: Resolving names of types and variables; Resolving names of functions; Adding new function into scope; Assigning values to variables.
Наследование: IScriptScope
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Clean ( ) : void

Cleans Scope (Removes items)

GetFunctionDefinition ( string name ) : IInvokable

Gets Invokable object (Function) by a given name

GetItem ( string id, bool throwException ) : object

Returns value of the variable. Throws ScriptIdNotFoundException

HasVariable ( string id ) : bool

Returns true if excatly this scope has variable with given id

ScriptScope ( ) : System

Default Constructor

ScriptScope ( IScriptScope parent ) : System
SetItem ( string id, object value ) : void

Sets Item: variable or type

Защищенные методы

Метод Описание
GetVariableInternal ( string id, bool searchHierarchy ) : object

Searches the scope hierarchy for the given id, should return NoVariable if it is not found

Описание методов

Clean() публичный Метод

Cleans Scope (Removes items)
public Clean ( ) : void
Результат void

GetFunctionDefinition() публичный Метод

Gets Invokable object (Function) by a given name
public GetFunctionDefinition ( string name ) : IInvokable
name string Name
Результат IInvokable

GetItem() публичный Метод

Returns value of the variable. Throws ScriptIdNotFoundException
public GetItem ( string id, bool throwException ) : object
id string Variable ID
throwException bool
Результат object

GetVariableInternal() защищенный Метод

Searches the scope hierarchy for the given id, should return NoVariable if it is not found
protected GetVariableInternal ( string id, bool searchHierarchy ) : object
id string
searchHierarchy bool
Результат object

HasVariable() публичный Метод

Returns true if excatly this scope has variable with given id
public HasVariable ( string id ) : bool
id string
Результат bool

ScriptScope() публичный Метод

Default Constructor
public ScriptScope ( ) : System
Результат System

ScriptScope() публичный Метод

public ScriptScope ( IScriptScope parent ) : System
parent IScriptScope
Результат System

SetItem() публичный Метод

Sets Item: variable or type
public SetItem ( string id, object value ) : void
id string item's id
value object value
Результат void