Exemplo n.º 1
0
        public override ChangeBatch GetChangeBatch(uint batchSize, SyncKnowledge destKnowledge, out object changeDataRetriever)
        {
            DbChangesParameters changesParams = Proxy.GetChanges(batchSize, destKnowledge);

            changeDataRetriever = changesParams.DataRetriever;

            DbSyncContext context = changeDataRetriever as DbSyncContext;

            // Check if the data is batched
            if (context != null && context.IsDataBatched)
            {
                CheckAndCreateBatchingDirectory(context);
                DownloadBatchingFile(context);
            }

            return(changesParams.ChangeBatch);
        }
Exemplo n.º 2
0
        public DbChangesParameters GetChanges(uint batchSize, Microsoft.Synchronization.SyncKnowledge destKnowledge)
        {
            DbChangesParameters changesParams = new DbChangesParameters();

            changesParams.ChangeBatch = Provider.GetChangeBatch(batchSize, destKnowledge, out changesParams.DataRetriever);

            DbSyncContext context = changesParams.DataRetriever as DbSyncContext;

            // Check to see if data is batched
            if (context != null && context.IsDataBatched)
            {
                // Don't send the file location info, just send the file
                string filename = new FileInfo(context.BatchFileName).Name;
                batchIdToFileMapper[filename] = context.BatchFileName;
                context.BatchFileName         = filename;
            }

            return(changesParams);
        }