private static ImmutableArray <CppCheckLocation> ParseLocationsSubtree(XmlReader reader, CppCheckStrings strings) { ImmutableArray <CppCheckLocation> .Builder locationBuilder = ImmutableArray.CreateBuilder <CppCheckLocation>(); if (!reader.IsEmptyElement) { int startingDepth = reader.Depth; reader.Read(); while (reader.Depth > startingDepth) { Debug.Assert(reader.Depth == startingDepth + 1); if (reader.NodeType == XmlNodeType.Whitespace) { reader.Read(); } else { locationBuilder.Add(CppCheckLocation.Parse(reader, strings)); } } } ImmutableArray <CppCheckLocation> locations = locationBuilder.ToImmutable(); return(locations); }
private static ImmutableArray <CppCheckLocation> ParseLocationsSubtree(XmlReader reader, CppCheckStrings strings) { ImmutableArray <CppCheckLocation> .Builder locationBuilder = ImmutableArray.CreateBuilder <CppCheckLocation>(); if (!reader.IsEmptyElement) { int startingDepth = reader.Depth; reader.Read(); while (reader.Depth > startingDepth) { if (reader.NodeType == XmlNodeType.Whitespace) { reader.Read(); } else { if (!reader.LocalName.Equals("location", StringComparison.OrdinalIgnoreCase)) { reader.Read(); continue; } locationBuilder.Add(CppCheckLocation.Parse(reader, strings)); } } } return(locationBuilder.ToImmutable()); }
private static CppCheckLocation Parse(XmlReader xml) { return(CppCheckLocation.Parse(xml, new CppCheckStrings(xml.NameTable))); }