Created
August 22, 2020 13:05
-
-
Save martinrayenglish/650def65b096ef0e00c1b3d9d001a056 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.Threading.Tasks; | |
using Sitecore.Xdb.Collection; | |
using Sitecore.Xdb.Collection.Indexing; | |
using Sitecore.Xdb.Collection.Model; | |
namespace Test.SCExtensions.Xdb.Collection.Search.Solr | |
{ | |
public sealed class IndexRebuilderFilterDecorator : IIndexRebuilder | |
{ | |
private readonly IIndexRebuilder _inner; | |
public IndexRebuilderFilterDecorator(IIndexRebuilder inner) | |
{ | |
this._inner = inner; | |
} | |
public Task BeginRebuild() | |
{ | |
return this._inner.BeginRebuild(); | |
} | |
public Task CompleteRebuild(ISyncToken syncToken) | |
{ | |
return this._inner.CompleteRebuild(syncToken); | |
} | |
public async Task WriteDataBatch(ChangedDataRecords changedDataRecordsBatch) | |
{ | |
ChangedDataRecords filteredChanges = new ChangedDataRecords(changedDataRecordsBatch.get_ContactRecords(), (IReadOnlyCollection<InteractionDataRecord>) new List<InteractionDataRecord>().AsReadOnly(), changedDataRecordsBatch.get_DeletedContactIds(), changedDataRecordsBatch.get_DeletedInteractionIds()); | |
await this._inner.WriteDataBatch(filteredChanges).ConfigureAwait(false); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment