示例#1
0
        private TypeSchema Pop()
        {
            TypeSchema popped = _stack[_stack.Count - 1];

            _stack.RemoveAt(_stack.Count - 1);
            TypeSchema newValue = _stack.LastOrDefault();

            if (newValue != null)
            {
                _currentSchema = newValue.Schema;
            }
            else
            {
                _currentSchema = null;
            }

            return(popped);
        }
示例#2
0
 private void Push(TypeSchema typeSchema)
 {
     _currentSchema = typeSchema.Schema;
     _stack.Add(typeSchema);
     _resolver.LoadedSchemas.Add(typeSchema.Schema);
 }