Example #1
0
        private static string ToCsv(Estimation estimation, int lineNumber)
        {
            var line = new StringBuilder();
            EstimationResult result = estimation.Result;

            line.Append(estimation.FileName);
            line.Append(CsvSepearator);
            line.Append(CsvSepearator);
            line.AppendFormat(FormulaPattern, lineNumber);
            line.Append(CsvSepearator);
            line.Append(estimation.IsUpdate);
            line.Append(CsvSepearator);
            line.AddCount(GeometryType.Text, result, CsvSepearator);
            line.Append(result.CharCount);
            line.Append(CsvSepearator);
            line.AddCounts(GeometryType.Line, result, CsvSepearator);
            line.AddCounts(GeometryType.Rectangle, result, CsvSepearator);
            line.AddCount(GeometryType.Polygon, result, CsvSepearator);
            line.AddCounts(GeometryType.Circle, result, CsvSepearator);
            line.AddCounts(GeometryType.Ellipse, result, CsvSepearator);
            line.AddCount(GeometryType.Path, result, CsvSepearator);
            line.AddCount(GeometryType.PolyLine, result, CsvSepearator);
            line.Append(result.ComplexObjectPointCount);
            line.Append(CsvSepearator);
            line.AddCounts(GeometryType.Image, result, CsvSepearator);
            line.Append(estimation.FilePath);
            return(line.ToString());
        }