//If full enumeration is needed because this provider is out of date due to tombstone cleanup, then this method will be called by the engine. public byte[] ProcessRemoteFullEnumerationChangeBatch(ConflictResolutionPolicy resolutionPolicy, FullEnumerationChangeBatch sourceChanges, CachedChangeDataRetriever changeDataRetriever, byte[] changeApplierInfo) { _metadataStore.BeginTransaction(); //Get all my local change versions from the metadata store IEnumerable <ItemChange> localChanges = _metadata.GetFullEnumerationLocalVersions(sourceChanges); NotifyingChangeApplier changeApplier = new NotifyingChangeApplier(_idFormats); // The following step is required because we are remote change application changeApplier.LoadChangeApplierInfo(changeApplierInfo); changeApplier.ApplyFullEnumerationChanges( resolutionPolicy, sourceChanges, changeDataRetriever as IChangeDataRetriever, localChanges, _metadata.GetKnowledge(), _metadata.GetForgottenKnowledge(), this, null, // Note that we do not pass a sync session context syncCallbacks); _metadataStore.CommitTransaction(); // Return the ChangeApplierInfo return(changeApplier.GetChangeApplierInfo()); }
//If full enumeration is needed because this provider is out of date due to tombstone cleanup, then this method will be called by the engine. public override void ProcessFullEnumerationChangeBatch(ConflictResolutionPolicy resolutionPolicy, FullEnumerationChangeBatch sourceChanges, object changeDataRetriever, SyncCallbacks syncCallback, SyncSessionStatistics sessionStatistics) { _metadataStore.BeginTransaction(); //Get all my local change versions from the metadata store IEnumerable <ItemChange> localChanges = _metadata.GetFullEnumerationLocalVersions(sourceChanges); //Create a changeapplier object to make change application easier (make the engine call me //when it needs data and when I should save data) NotifyingChangeApplier changeApplier = new NotifyingChangeApplier(_idFormats); changeApplier.ApplyFullEnumerationChanges(resolutionPolicy, sourceChanges, changeDataRetriever as IChangeDataRetriever, localChanges, _metadata.GetKnowledge(), _metadata.GetForgottenKnowledge(), this, _currentSessionContext, syncCallback); _metadataStore.CommitTransaction(); }