public void WriteRows(object[][] rows, int rowCount) { MethodProfiler.BeginMethod(); _logResultWriter.WriteRows(rows, rowCount); try { var sb = new StringBuilder(); for (var i = 0; i < rowCount; i++) { var row = rows[i]; var last = row.Length - 1; for (var j = 0; j < last; j++) { Write(sb, StringValue(row[j], _columnSize[j]), _columnSize[j]); sb.Append(' '); } sb.Append(StringValue(row[last], _columnSize[last])); sb.Append(Environment.NewLine); } _rowIndex += rowCount; _textWriter.Write(sb.ToString()); } finally { MethodProfiler.EndMethod(); } }
public static void Main() { try { var updateStarted = Update(); if (!updateStarted) { LogFactoryReader.Read(); MethodProfiler.BeginMethod(); try { Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; Thread.CurrentThread.CurrentUICulture = CultureInfo.InvariantCulture; Run(); } finally { LogFactory.Instance.Dispose(); MethodProfiler.EndMethod(); MethodProfiler.Close(); } } } catch (Exception e) { MessageBox.Show(e.ToString(), "Fatal Application Error in Data Commander!", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
void IResultWriter.WriteRows(object[][] rows, int rowCount) { MethodProfiler.BeginMethod(); _logResultWriter.WriteRows(rows, rowCount); try { var targetRows = _dataTable.Rows; for (var i = 0; i < rowCount; i++) { targetRows.Add(rows[i]); } _rowIndex += rowCount; } finally { MethodProfiler.EndMethod(); } }