Exemple #1
0
        private void ThrowTagMismatch(NodeData startTag)
        {
            if (startTag.type == XmlNodeType.Element)
            {
                // parse the bad name
                int colonPos;
                int endPos = ParseQName(out colonPos);

                string[] args = new string[3];
                args[0] = startTag.GetNameWPrefix(nameTable);
                ///////ISSUE: rswaney: SPOT string class doesn't have a culture-aware or case-insensitive compare

                args[1] = startTag.lineInfo.lineNo.ToString(/* CultureInfo.InvariantCulture */);
                args[2] = new string(ps.chars, ps.charPos, endPos - ps.charPos);
                Throw(Res.Xml_TagMismatch, args);
            }
            else
            {
                Debug.Assert(startTag.type == XmlNodeType.EntityReference);
                Throw(Res.Xml_UnexpectedEndTag);
            }
        }
Exemple #2
0
        private void ThrowTagMismatch(NodeData startTag)
        {
            if (startTag.type == XmlNodeType.Element)
            {
                // parse the bad name
                int colonPos;
                int endPos = ParseQName(out colonPos);

                string[] args = new string[4];
                args[0] = startTag.GetNameWPrefix(_nameTable);
                args[1] = startTag.lineInfo.lineNo.ToString(CultureInfo.InvariantCulture);
                args[2] = startTag.lineInfo.linePos.ToString(CultureInfo.InvariantCulture);
                args[3] = new string(_ps.chars, _ps.charPos, endPos - _ps.charPos);
                Throw(SR.Xml_TagMismatchEx, args);
            }
            else
            {
                Debug.Assert(startTag.type == XmlNodeType.EntityReference);
                Throw(SR.Xml_UnexpectedEndTag);
            }
        }
        private async Task ThrowTagMismatchAsync(NodeData startTag)
        {
            if (startTag.type == XmlNodeType.Element)
            {
                // parse the bad name
                int colonPos;

                var tuple_5 = await ParseQNameAsync().ConfigureAwait(false);
                colonPos = tuple_5.Item1;

                int endPos = tuple_5.Item2;

                string[] args = new string[4];
                args[0] = startTag.GetNameWPrefix(_nameTable);
                args[1] = startTag.lineInfo.lineNo.ToString(CultureInfo.InvariantCulture);
                args[2] = startTag.lineInfo.linePos.ToString(CultureInfo.InvariantCulture);
                args[3] = new string(_ps.chars, _ps.charPos, endPos - _ps.charPos);
                Throw(SR.Xml_TagMismatchEx, args);
            }
            else
            {
                Debug.Assert(startTag.type == XmlNodeType.EntityReference);
                Throw(SR.Xml_UnexpectedEndTag);
            }
        }