Пример #1
0
        public static ModelModificationBatch Create(ModifyModel[] modifications)
        {
            ModifyModel            first   = modifications[0];
            ModelModificationBatch message = new(first, modifications, 0);

            return(message);
        }
Пример #2
0
        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);
        }