<PackageReference Include="Relativity.Server.Import.SDK" Version="2.9.2" />

BatchCleanUp

public class BatchCleanUp : IBatchCleanUp
using Relativity.DataExchange.Export.VolumeManagerV2.Repository; using Relativity.Logging; using System; using System.Collections.Generic; namespace Relativity.DataExchange.Export.VolumeManagerV2.Batches { public class BatchCleanUp : IBatchCleanUp { private readonly IList<IClearable> _repositories; private readonly ILog _logger; public BatchCleanUp(IList<IClearable> repositories, ILog logger) { _repositories = repositories; _logger = logger; } public void CleanUp() { _logger.LogVerbose("Clearing repositories after exporting batch.", Array.Empty<object>()); foreach (IClearable repository in _repositories) { try { repository.Clear(); } catch (Exception ex) { _logger.LogError(ex, "Error occurred during {typeOfRepository} repository cleanup. Continuing to the next repository.", new object[1] { repository?.GetType() }); } } _logger.LogVerbose("Repositories cleared.", Array.Empty<object>()); } } }