public static ModelModificationBatch Create(ModifyModel[] modifications) { ModifyModel first = modifications[0]; ModelModificationBatch message = new(first, modifications, 0); return(message); }
public static bool TryContinue(ModelModificationBatch batch, IEnumerable <Message> predecessors, out ModelModificationBatch newBatch) { if (batch.IsCompleted) { newBatch = null; return(false); } ModifyModel nextModification = batch.Modifications[batch.Index + 1]; newBatch = new ModelModificationBatch(nextModification, batch.Modifications, batch.Index + 1, predecessors); return(true); }