C# Класс 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.
Наследование: IDynamicMetaObjectProvider
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
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.

Приватные методы

Метод Описание
HasVariable ( string name ) : bool

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

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

Deletes the named value from the scope optionally ignoring the case.
public DeleteValue ( string name, bool ignoreCase ) : bool
name string
ignoreCase bool
Результат bool

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

Returns all of the member names and their associated values from the scope. The list contains all available casings.
public GetItems ( ) : dynamic>>.IList
Результат dynamic>>.IList

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

Returns all of the member names which currently have values in the scope. The list contains all available casings.
public GetMemberNames ( ) : IList
Результат IList

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

public GetMetaObject ( Expression parameter ) : DynamicMetaObject
parameter Expression
Результат DynamicMetaObject

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

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
Результат IScopeVariable

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

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
Результат ScopeVariable

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

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
Результат ScopeVariableIgnoreCase

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

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
Результат System.Object

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

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
Результат bool

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

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
Результат void

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

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
Результат bool

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

Provides convenient case-sensitive value access.
public this ( string index ) : Object
index string
Результат System.Object