Пример #1
0
        internal void PushScope(CdmTraitDefinition currentTrait)
        {
            if (this.ScopeStack == null)
            {
                this.ScopeStack = new Stack <ResolveContextScope>();
            }

            ResolveContextScope ctxNew = new ResolveContextScope
            {
                CurrentTrait     = currentTrait != null ? currentTrait : this.CurrentScope?.CurrentTrait,
                CurrentParameter = 0
            };

            this.CurrentScope = ctxNew;
            this.ScopeStack.Push(ctxNew);
        }
Пример #2
0
 internal void PopScope()
 {
     this.ScopeStack.Pop();
     this.CurrentScope = this.ScopeStack.Count > 0 ? this.ScopeStack.Peek() : null;
 }