示例#1
0
        private Scalar ParseSequenceLengthField(QName name, System.Xml.XmlElement sequence, bool optional, ParsingContext parent)
        {
            System.Xml.XmlNodeList lengthElements = sequence.GetElementsByTagName("length");

            if (lengthElements.Count == 0)
            {
                var implicitLength = new Scalar(Global.CreateImplicitName(name), FASTType.U32, Operator.Operator.NONE, ScalarValue.UNDEFINED, optional)
                {
                    Dictionary = parent.Dictionary
                };
                return(implicitLength);
            }

            var length  = (System.Xml.XmlElement)lengthElements.Item(0);
            var context = new ParsingContext(length, parent);

            return((Scalar)sequenceLengthParser.Parse(length, optional, context));
        }