C# Class Microsoft.Scripting.Runtime.Scope

Represents a context of execution. A context of execution has a set of variables associated with it (its dictionary) and a parent context. When looking up a name from a context first the local context is searched. If the name is not found there the name lookup will be done against the parent context. Scopes, like IAttrbibuteCollections, support both being indexed by SymbolId for fast access as well as being indexed by object. The preferred access is via SymbolId and object access is provided for languages which require additional semantics. All features supported for feature IDs are also supported for objects (e.g. context-sentsitivity and attributes) but the object API does not contain all the same sets of overloads provided for convenience. TODO: Thread safety
Afficher le fichier Open project: jschementi/iron Class Usage Examples

Méthodes publiques

Méthode Description
GetExtension ( ContextId languageContextId ) : Microsoft.Scripting.Runtime.ScopeExtension

Gets the ScopeExtension associated with the provided ContextId.

Scope ( ) : System.Linq.Expressions

Creates a new scope with a new empty thread-safe dictionary.

Scope ( object>.IDictionary dictionary ) : System.Linq.Expressions
Scope ( IDynamicMetaObjectProvider storage ) : System.Linq.Expressions

Creates a new scope which is backed by an arbitrary object for it's storage.

SetExtension ( ContextId languageContextId, Microsoft.Scripting.Runtime.ScopeExtension extension ) : Microsoft.Scripting.Runtime.ScopeExtension

Sets the ScopeExtension to the provided value for the given ContextId. The extension can only be set once. The returned value is either the new ScopeExtension if no value was previously set or the previous value.

Private Methods

Méthode Description
IDynamicMetaObjectProvider ( Expression parameter ) : DynamicMetaObject

Method Details

GetExtension() public méthode

Gets the ScopeExtension associated with the provided ContextId.
public GetExtension ( ContextId languageContextId ) : Microsoft.Scripting.Runtime.ScopeExtension
languageContextId ContextId
Résultat Microsoft.Scripting.Runtime.ScopeExtension

Scope() public méthode

Creates a new scope with a new empty thread-safe dictionary.
public Scope ( ) : System.Linq.Expressions
Résultat System.Linq.Expressions

Scope() public méthode

public Scope ( object>.IDictionary dictionary ) : System.Linq.Expressions
dictionary object>.IDictionary
Résultat System.Linq.Expressions

Scope() public méthode

Creates a new scope which is backed by an arbitrary object for it's storage.
public Scope ( IDynamicMetaObjectProvider storage ) : System.Linq.Expressions
storage IDynamicMetaObjectProvider
Résultat System.Linq.Expressions

SetExtension() public méthode

Sets the ScopeExtension to the provided value for the given ContextId. The extension can only be set once. The returned value is either the new ScopeExtension if no value was previously set or the previous value.
public SetExtension ( ContextId languageContextId, Microsoft.Scripting.Runtime.ScopeExtension extension ) : Microsoft.Scripting.Runtime.ScopeExtension
languageContextId ContextId
extension Microsoft.Scripting.Runtime.ScopeExtension
Résultat Microsoft.Scripting.Runtime.ScopeExtension