TransferStatisticsCalculator
namespace Relativity.Transfer.Job
{
internal class TransferStatisticsCalculator : ITransferStatisticsCalculator
{
public void Update(TransferStatistics statistics, TransferPathStatus pathStatus)
{
switch (pathStatus) {
case TransferPathStatus.Canceled:
case TransferPathStatus.Started:
case TransferPathStatus.Successful:
break;
case TransferPathStatus.Skipped:
statistics.TotalSkippedFiles++;
break;
case TransferPathStatus.None:
statistics.TotalFilesNotFound++;
break;
case TransferPathStatus.Failed:
statistics.TotalFailedFiles++;
break;
case TransferPathStatus.Fatal:
statistics.TotalFatalErrors++;
break;
case TransferPathStatus.FileNotFound:
statistics.TotalFilesNotFound++;
break;
case TransferPathStatus.PermissionsError:
statistics.TotalFilePermissionsErrors++;
break;
case TransferPathStatus.BadPathError:
statistics.TotalBadPathErrors++;
break;
case TransferPathStatus.FileBlocked:
statistics.TotalFilesIdentifiedAsMalware++;
break;
}
}
}
}