private ExecutionItem TransformToExecutionItem(RevisionReference revRef)
        {
            var item = _context.GetItem(revRef.OriginId);
            var rev  = item.Revisions[revRef.RevIndex];

            rev.Time = revRef.Time;
            return(new ExecutionItem()
            {
                OriginId = item.OriginId, WiId = item.WiId, WiType = item.Type, Revision = rev
            });
        }
Example #2
0
        private IEnumerable <RevisionReference> BuildExecutionPlanFromDir()
        {
            var actionPlan = new List <RevisionReference>();

            foreach (var wi in _context.EnumerateAllItems())
            {
                Logger.Log(LogLevel.Debug, $"Processing {wi.OriginId}");
                foreach (var rev in wi.Revisions)
                {
                    var revRef = new RevisionReference()
                    {
                        OriginId = wi.OriginId, RevIndex = rev.Index, Time = rev.Time
                    };
                    actionPlan.Add(revRef);
                }
            }
            actionPlan.Sort();

            EnsureIncreasingTimes(actionPlan);

            return(actionPlan);
        }