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

BatchNodesBuffer

using Relativity.DataTransfer.Nodes; using System.Collections.Generic; namespace Relativity.Transfer.Enumeration.Batches { internal class BatchNodesBuffer { private readonly IList<INode> _buffer = new List<INode>(); public long CurrentBatchBytesSize { get; set; } public long FilesInCurrentBatch { get; set; } public long DirectoriesInCurrentBatch { get; set; } public BatchNodesBuffer() { FilesInCurrentBatch = 0; DirectoriesInCurrentBatch = 0; CurrentBatchBytesSize = 0; } public void Add(INode node) { IFile obj = node as IFile; long num = obj?.Size ?? 0; _buffer.Add(node); if (obj != null) FilesInCurrentBatch++; else DirectoriesInCurrentBatch++; CurrentBatchBytesSize += num; } public IEnumerable<INode> GetNodes() { return _buffer; } public int Count() { return _buffer.Count; } } }