public override ChangeBatch GetChangeBatch(uint batchSize, SyncKnowledge destinationKnowledge, out object changeDataRetriever) { var temp = _metadata.GetChangeBatch(uint.MaxValue, destinationKnowledge); ChangeBatch batch = _metadata.GetChangeBatch(batchSize, destinationKnowledge); changeDataRetriever = this; //this is where the transfer mechanism/protocol would go. For an in memory provider, this is sufficient var batchCount = (uint)batch.Count(); batch.BatchWorkEstimate = batchCount; batch.RemainingSessionWorkEstimate = (uint)temp.Count(); return(batch); }
public override ChangeBatch GetChangeBatch(uint batchSize, SyncKnowledge destinationKnowledge, out object changeDataRetriever) { ChangeBatch batch = _metaData.GetChangeBatch(batchSize, destinationKnowledge); changeDataRetriever = this; //this is where the transfer mechanism/protocol would go. For an in memory provider, this is sufficient //Calculate estimate work batch.RemainingSessionWorkEstimate = RemainingSessionWorkEstimate; batch.BatchWorkEstimate = batch.IsLastBatch ? (uint)batch.Count() : batchSize; RemainingSessionWorkEstimate = batch.IsLastBatch ? 0 : RemainingSessionWorkEstimate - batchSize; return(batch); }