C# 클래스 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
파일 보기 프로젝트 열기: jschementi/iron 1 사용 예제들

공개 메소드들

메소드 설명
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.

비공개 메소드들

메소드 설명
IDynamicMetaObjectProvider ( Expression parameter ) : DynamicMetaObject

메소드 상세

GetExtension() 공개 메소드

Gets the ScopeExtension associated with the provided ContextId.
public GetExtension ( ContextId languageContextId ) : Microsoft.Scripting.Runtime.ScopeExtension
languageContextId ContextId
리턴 Microsoft.Scripting.Runtime.ScopeExtension

Scope() 공개 메소드

Creates a new scope with a new empty thread-safe dictionary.
public Scope ( ) : System.Linq.Expressions
리턴 System.Linq.Expressions

Scope() 공개 메소드

public Scope ( object>.IDictionary dictionary ) : System.Linq.Expressions
dictionary object>.IDictionary
리턴 System.Linq.Expressions

Scope() 공개 메소드

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

SetExtension() 공개 메소드

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
리턴 Microsoft.Scripting.Runtime.ScopeExtension