Пример #1
0
        private void StartStack()
        {
            _stack = new Stack <TypeNameFrame>();
            TypeNameFrame frame;

            frame = new TypeNameFrame();
            _stack.Push(frame);
        }
Пример #2
0
        void Callout_FoundName(string prefix, string name)
        {
            TypeNameFrame frame = new TypeNameFrame();

            frame.Name = name;
            string ns = _prefixResolver(prefix);

            frame.Namespace = ns ?? throw new TypeNameParserException(SR.Get(SRID.PrefixNotFound, prefix));
            _stack.Push(frame);
        }
Пример #3
0
        void Callout_EndOfType()
        {
            TypeNameFrame frame    = _stack.Pop();
            XamlTypeName  typeName = new XamlTypeName(frame.Namespace, frame.Name, frame.TypeArgs);

            frame = _stack.Peek();
            if (frame.TypeArgs == null)
            {
                frame.AllocateTypeArgs();
            }
            frame.TypeArgs.Add(typeName);
        }
        private void Callout_EndOfType()
        {
            TypeNameFrame frame = this._stack.Pop();
            XamlTypeName  item  = new XamlTypeName(frame.Namespace, frame.Name, frame.TypeArgs);

            frame = this._stack.Peek();
            if (frame.TypeArgs == null)
            {
                frame.AllocateTypeArgs();
            }
            frame.TypeArgs.Add(item);
        }
Пример #5
0
        private IList <XamlTypeName> CollectNameListFromStack()
        {
            if (_stack.Count != 1)
            {
                throw new TypeNameParserException(SR.Get(SRID.InvalidTypeString, _inputText));
            }

            TypeNameFrame frame = _stack.Peek();

            List <XamlTypeName> xamlTypeNameList = frame.TypeArgs;

            return(xamlTypeNameList);
        }
        private XamlTypeName CollectNameFromStack()
        {
            if (this._stack.Count != 1)
            {
                throw new TypeNameParserException(System.Xaml.SR.Get("InvalidTypeString", new object[] { this._inputText }));
            }
            TypeNameFrame frame = this._stack.Peek();

            if (frame.TypeArgs.Count != 1)
            {
                throw new TypeNameParserException(System.Xaml.SR.Get("InvalidTypeString", new object[] { this._inputText }));
            }
            return(frame.TypeArgs[0]);
        }
        private void Callout_FoundName(string prefix, string name)
        {
            TypeNameFrame item = new TypeNameFrame {
                Name = name
            };
            string str = this._prefixResolver(prefix);

            if (str == null)
            {
                throw new TypeNameParserException(System.Xaml.SR.Get("PrefixNotFound", new object[] { prefix }));
            }
            item.Namespace = str;
            this._stack.Push(item);
        }
Пример #8
0
        private XamlTypeName CollectNameFromStack()
        {
            if (_stack.Count != 1)
            {
                throw new TypeNameParserException(SR.Get(SRID.InvalidTypeString, _inputText));
            }

            TypeNameFrame frame = _stack.Peek();

            if (frame.TypeArgs.Count != 1)
            {
                throw new TypeNameParserException(SR.Get(SRID.InvalidTypeString, _inputText));
            }

            XamlTypeName xamlTypeName = frame.TypeArgs[0];

            return(xamlTypeName);
        }
Пример #9
0
        void Callout_Subscript(string subscript)
        {
            TypeNameFrame frame = _stack.Peek();

            frame.Name += subscript;
        }
        private void Callout_Subscript(string subscript)
        {
            TypeNameFrame local1 = this._stack.Peek();

            local1.Name = local1.Name + subscript;
        }