<PackageReference Include="Relativity.Server.Transfer.SDK" Version="24000.0.1" />

TransferStatisticsPublisherGuard

using System; namespace Relativity.Transfer { internal class TransferStatisticsPublisherGuard : ITransferStatisticsPublisherGuard { private ITransferStatistics lastPublishedStatistics; public TransferStatisticsPublisherGuard(ITransferStatistics statistics) { if (statistics == null) throw new ArgumentNullException("statistics"); lastPublishedStatistics = statistics; } public bool CanPublish(ITransferStatistics statisticsToBePublished) { bool num = lastPublishedStatistics.TotalRequestBytes <= statisticsToBePublished.TotalRequestBytes && lastPublishedStatistics.TotalRequestFiles <= statisticsToBePublished.TotalRequestFiles && lastPublishedStatistics.TotalTransferredBytes <= statisticsToBePublished.TotalTransferredBytes && lastPublishedStatistics.TotalTransferredFiles <= statisticsToBePublished.TotalTransferredFiles; if (num) lastPublishedStatistics = statisticsToBePublished; return num; } } }