protected DirectoryEntry(string rel, bool isOpen, DirectoryInfo dir, ImmutableList<DirectoryEntry> directories, ImmutableList<Entry> files) : base(rel, isOpen) { _dir = dir; _directories = directories; _files = files; _children = new Lazy<IReadOnlyList<Entry>>(() => _directories.Cast<Entry>().Concat(_files).ToImmutableList()); }
protected DirectoryEntry(string rel, bool isOpen, DirectoryInfo dir, ImmutableList <DirectoryEntry> directories, ImmutableList <Entry> files) : base(rel, isOpen) { _dir = dir; _directories = directories; _files = files; _children = new Lazy <IReadOnlyList <Entry> >(() => _directories.Cast <Entry>().Concat(_files).ToImmutableList()); }
internal void ExecuteInstructions(ImmutableList <Action> actions) { var assignments = actions.Where(a => a is Assignment).Cast <Assignment>(); AssignBots(assignments, _bots, Logger); actions = actions.RemoveRange(assignments); var transfers = actions.Cast <Transfer>().ToImmutableList(); while (transfers.Count > 0) { var readyBot = _bots.First(b => b.Value.ReadyForTransfer).Value; var instruction = transfers.Find(a => a.BotNumber == readyBot.Number) !; var(high, low) = readyBot.GetValues(Logger); ApplyTarget(readyBot, instruction.LowTarget, low, _outputs, _bots, Logger); ApplyTarget(readyBot, instruction.HighTarget, high, _outputs, _bots, Logger); transfers = transfers.Remove(instruction); }