public ChangeBatch GetChangeBatch(
     uint batchSize,
     SyncKnowledge destinationKnowledge,
     out CachedChangeDataRetriever changeDataRetriever)
 {
     return(base.Channel.GetChangeBatch(
                batchSize,
                destinationKnowledge,
                out changeDataRetriever));
 }
예제 #2
0
 public byte[] ProcessFullEnumerationChangeBatch(
     ConflictResolutionPolicy resolutionPolicy,
     FullEnumerationChangeBatch sourceChanges,
     CachedChangeDataRetriever changeDataRetriever,
     byte[] changeApplierInfo)
 {
     return(FindProvider().ProcessRemoteFullEnumerationChangeBatch(
                resolutionPolicy,
                sourceChanges,
                changeDataRetriever,
                changeApplierInfo));
 }
 public byte[] ProcessChangeBatch(
     ConflictResolutionPolicy resolutionPolicy,
     ChangeBatch sourceChanges,
     CachedChangeDataRetriever changeDataRetriever,
     byte[] changeApplierInfo)
 {
     return(base.Channel.ProcessChangeBatch(
                resolutionPolicy,
                sourceChanges,
                changeDataRetriever,
                changeApplierInfo));
 }
 public FullEnumerationChangeBatch GetFullEnumerationChangeBatch(
     uint batchSize,
     SyncId lowerEnumerationBound,
     SyncKnowledge knowledgeForDataRetrieval,
     out CachedChangeDataRetriever changeDataRetriever)
 {
     return(base.Channel.GetFullEnumerationChangeBatch(
                batchSize,
                lowerEnumerationBound,
                knowledgeForDataRetrieval,
                out changeDataRetriever));
 }
예제 #5
0
        public ChangeBatch GetChangeBatch(
            uint batchSize,
            SyncKnowledge destinationKnowledge,
            out CachedChangeDataRetriever changeDataRetriever)
        {
            object dataRetriever;

            ChangeBatch changeBatch = FindProvider().GetChangeBatch(
                batchSize,
                destinationKnowledge,
                out dataRetriever);

            changeDataRetriever = new CachedChangeDataRetriever(
                dataRetriever as IChangeDataRetriever,
                changeBatch);

            return(changeBatch);
        }
예제 #6
0
        public FullEnumerationChangeBatch GetFullEnumerationChangeBatch(
            uint batchSize,
            SyncId lowerEnumerationBound,
            SyncKnowledge knowledgeForDataRetrieval,
            out CachedChangeDataRetriever changeDataRetriever)
        {
            object dataRetriever;

            FullEnumerationChangeBatch changeBatch = FindProvider().GetFullEnumerationChangeBatch(
                batchSize,
                lowerEnumerationBound,
                knowledgeForDataRetrieval,
                out dataRetriever);

            changeDataRetriever = new CachedChangeDataRetriever(
                dataRetriever as IChangeDataRetriever,
                changeBatch);

            return(changeBatch);
        }
예제 #7
0
        public override void ProcessFullEnumerationChangeBatch(
            ConflictResolutionPolicy resolutionPolicy,
            FullEnumerationChangeBatch sourceChanges,
            object changeDataRetriever,
            SyncCallbacks syncCallback,
            SyncSessionStatistics sessionStatistics)
        {
            try
            {
                CachedChangeDataRetriever cachedChangeDataRetriever = new CachedChangeDataRetriever(
                    changeDataRetriever as IChangeDataRetriever,
                    sourceChanges);

                byte[] newChangeApplierInfo = this.client.ProcessFullEnumerationChangeBatch(
                    resolutionPolicy,
                    sourceChanges,
                    cachedChangeDataRetriever,
                    this.syncSessionContext.ChangeApplierInfo);

                this.syncSessionContext.ChangeApplierInfo = newChangeApplierInfo;
            }
            catch (Exception ex) { Console.WriteLine(ex.Message); }
        }
예제 #8
0
        //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());
        }