C# Class 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.
Inheritance: IScriptScope
Afficher le fichier Open project: Zepheus/Fiesta_Utils Class Usage Examples

Méthodes publiques

Méthode Description
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

Méthodes protégées

Méthode Description
GetVariableInternal ( string id, bool searchHierarchy ) : object

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

Method Details

Clean() public méthode

Cleans Scope (Removes items)
public Clean ( ) : void
Résultat void

GetFunctionDefinition() public méthode

Gets Invokable object (Function) by a given name
public GetFunctionDefinition ( string name ) : IInvokable
name string Name
Résultat IInvokable

GetItem() public méthode

Returns value of the variable. Throws ScriptIdNotFoundException
public GetItem ( string id, bool throwException ) : object
id string Variable ID
throwException bool
Résultat object

GetVariableInternal() protected méthode

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
Résultat object

HasVariable() public méthode

Returns true if excatly this scope has variable with given id
public HasVariable ( string id ) : bool
id string
Résultat bool

ScriptScope() public méthode

Default Constructor
public ScriptScope ( ) : System
Résultat System

ScriptScope() public méthode

public ScriptScope ( IScriptScope parent ) : System
parent IScriptScope
Résultat System

SetItem() public méthode

Sets Item: variable or type
public SetItem ( string id, object value ) : void
id string item's id
value object value
Résultat void