/// <nodoc /> private LineInfo([NotNull] LineMap map, int position) : this() { Contract.Requires(map != null); m_map = map; m_position = position; }
private void ComputeLineAndColumnIfNeeded() { if (m_map != null) { var lineAndColumn = Scanner.ExpensiveComputeLineAndCharacterOfPositionSeeTask646652(m_map.Map, m_position); m_position = lineAndColumn.Character; m_line = lineAndColumn.Line; m_map = null; } }
/// <summary> /// Reads a line info using the provided reader /// </summary> /// <remarks> /// If the line info was originally stored in unexpanded form, then the provided line map is used /// to construct the instance. /// </remarks> public static LineInfo Read(LineMap lineMap, BuildXLReader reader) { var isUnexpanded = reader.ReadBoolean(); if (isUnexpanded) { var absolutePosition = reader.ReadInt32Compact(); return(FromLineMap(lineMap, absolutePosition)); } int line = reader.ReadInt32Compact(); int position = reader.ReadInt32Compact(); return(FromLineAndPosition(line, position)); }
/// <nodoc /> public static LineInfo FromLineMap([NotNull] LineMap map, int position) { return(new LineInfo(map, position)); }