public override string ToString() { var totalDigitCount = TotalFilesToProcess.ToString().Length; var perComplete = (double)TotalProcessedFiles / TotalFilesToProcess * 100; var avg = TotalElapsedTime.TotalMilliseconds / TotalProcessedFiles; var msg = $"[{perComplete.ToString("##0.0").PadLeft(6, ' ')} %][{TotalProcessedFiles.ToString().PadLeft(totalDigitCount, ' ')} of {TotalFilesToProcess}][ {TotalElapsedTime.TotalSeconds.ToString("0.0").PadLeft(4, ' ')} s][avg:{avg.ToString("0")} ms/p][ok: {Successful}]"; return(msg); }
public override string ToString() { var totalDigitCount = TotalFilesToProcess.ToString().Length; var perComplete = (double)TotalProcessedFiles / TotalFilesToProcess * 100; var avg = TotalProcessedFiles <= 0 ? 0 : TotalElapsedTime.TotalMilliseconds / TotalProcessedFiles; var msg = $"[{perComplete.ToString("##0.0").PadLeft(6, ' ')} %] [{TotalElapsedTime.TotalSeconds.ToString("0.0").PadLeft(4, ' ')} s ({TotalElapsedTime.FormatForConsoleReport()})]"; msg += $" [avg: {avg.ToString("0")} ms/i]"; msg += $" [{TotalProcessedFiles.ToString().PadLeft(totalDigitCount, ' ')} of {TotalFilesToProcess}]"; msg += $" [arc: {TotalFilesAdded.ToString("#,###,###,##0")} ({(TotalBytesAdded / (1024 * 1024)).ToString("#,###,###,##0")} mb)]"; msg += $" [i: {TotalImageFilesAdded.ToString("#,###,###,##0")} ({(TotalImageBytesAdded / (1024 * 1024)).ToString("#,###,###,##0")} mb)]"; msg += $" [v: {TotalVideoFilesAdded.ToString("#,###,###,##0")} ({(TotalVideoBytesAdded / (1024 * 1024)).ToString("#,###,###,##0")} mb)]"; msg += $" [oth: {TotalOtherFilesAdded.ToString("#,###,###,##0")} ({(TotalOtherBytesAdded / (1024 * 1024)).ToString("#,###,###,##0")} mb]"; msg += $" [excl: {TotalExcludedDuplicateFiles.ToString("#,###,###,##0")} ({(TotalBytesExcluded / (1024 * 1024)).ToString("#,###,###,##0")} mb)]"; return(msg); }