C# Class Microsoft.Scripting.ScopeStorage

Provides optimized and cacheable support for scope storage. This is the default object used for storing values in a scope.
The implementation uses a case-insensitive dictionary which holds onto ScopeVariableIgnoreCase objects. The SVIC's hold onto ScopeVariable objects for each possible casing.
Inheritance: IDynamicMetaObjectProvider
Afficher le fichier Open project: jschementi/iron Class Usage Examples

Méthodes publiques

Méthode Description
DeleteValue ( string name, bool ignoreCase ) : bool

Deletes the named value from the scope optionally ignoring the case.

GetItems ( ) : dynamic>>.IList

Returns all of the member names and their associated values from the scope. The list contains all available casings.

GetMemberNames ( ) : IList

Returns all of the member names which currently have values in the scope. The list contains all available casings.

GetMetaObject ( Expression parameter ) : DynamicMetaObject
GetScopeVariable ( string name, bool ignoreCase ) : IScopeVariable

Gets the IScopeVariable for the scope optionally ignoring case. The IScopeVariable can be held onto and get/set/deleted without performing a dictionary lookup on subsequent accesses.

GetScopeVariable ( string name ) : ScopeVariable

Gets the ScopeVariable for the scope in a case-sensitive manner. The ScopeVariable can be held onto and get/set/deleted without performing a dictionary lookup on subsequent accesses.

GetScopeVariableIgnoreCase ( string name ) : ScopeVariableIgnoreCase

Gets the ScopeVariableIgnoreCase for the scope in a case-insensitive manner. The ScopeVariable can be held onto and get/set/deleted without performing a dictionary lookup on subsequent accesses.

GetValue ( string name, bool ignoreCase ) : Object

Gets the named value from the scope optionally ignoring case. If the named value is not present an InvalidOperationException is raised.

HasValue ( string name, bool ignoreCase ) : bool

Checks if the named value is present in the scope optionally ignoring the case.

SetValue ( string name, bool ignoreCase, object value ) : void

Sets the named value in the scope optionally ignoring the case.

TryGetValue ( string name, bool ignoreCase, Object &value ) : bool

Attempts to get the named value from the scope optionally ignoring the case. Returns true if the value is present, false if it is not.

this ( string index ) : Object

Provides convenient case-sensitive value access.

Private Methods

Méthode Description
HasVariable ( string name ) : bool

Method Details

DeleteValue() public méthode

Deletes the named value from the scope optionally ignoring the case.
public DeleteValue ( string name, bool ignoreCase ) : bool
name string
ignoreCase bool
Résultat bool

GetItems() public méthode

Returns all of the member names and their associated values from the scope. The list contains all available casings.
public GetItems ( ) : dynamic>>.IList
Résultat dynamic>>.IList

GetMemberNames() public méthode

Returns all of the member names which currently have values in the scope. The list contains all available casings.
public GetMemberNames ( ) : IList
Résultat IList

GetMetaObject() public méthode

public GetMetaObject ( Expression parameter ) : DynamicMetaObject
parameter Expression
Résultat DynamicMetaObject

GetScopeVariable() public méthode

Gets the IScopeVariable for the scope optionally ignoring case. The IScopeVariable can be held onto and get/set/deleted without performing a dictionary lookup on subsequent accesses.
public GetScopeVariable ( string name, bool ignoreCase ) : IScopeVariable
name string
ignoreCase bool
Résultat IScopeVariable

GetScopeVariable() public méthode

Gets the ScopeVariable for the scope in a case-sensitive manner. The ScopeVariable can be held onto and get/set/deleted without performing a dictionary lookup on subsequent accesses.
public GetScopeVariable ( string name ) : ScopeVariable
name string
Résultat ScopeVariable

GetScopeVariableIgnoreCase() public méthode

Gets the ScopeVariableIgnoreCase for the scope in a case-insensitive manner. The ScopeVariable can be held onto and get/set/deleted without performing a dictionary lookup on subsequent accesses.
public GetScopeVariableIgnoreCase ( string name ) : ScopeVariableIgnoreCase
name string
Résultat ScopeVariableIgnoreCase

GetValue() public méthode

Gets the named value from the scope optionally ignoring case. If the named value is not present an InvalidOperationException is raised.
public GetValue ( string name, bool ignoreCase ) : Object
name string
ignoreCase bool
Résultat System.Object

HasValue() public méthode

Checks if the named value is present in the scope optionally ignoring the case.
public HasValue ( string name, bool ignoreCase ) : bool
name string
ignoreCase bool
Résultat bool

SetValue() public méthode

Sets the named value in the scope optionally ignoring the case.
public SetValue ( string name, bool ignoreCase, object value ) : void
name string
ignoreCase bool
value object
Résultat void

TryGetValue() public méthode

Attempts to get the named value from the scope optionally ignoring the case. Returns true if the value is present, false if it is not.
public TryGetValue ( string name, bool ignoreCase, Object &value ) : bool
name string
ignoreCase bool
value System.Object
Résultat bool

this() public méthode

Provides convenient case-sensitive value access.
public this ( string index ) : Object
index string
Résultat System.Object