public void Run(LatticeData data) { List<Tile> tiles = new List<Tile>(); foreach (var grid in data.Duplicates) { foreach (var tile in grid.Tiles) { Trace.TraceInformation("Checking for " + tile.FullPath); if (!Directory.Exists(tile.FullPath)) { tiles.Add(tile); if (tile.Group != null) { // TODO This should generate an event that causes a remove event in the AcqMonitor that checks if it removes from lattice (similar to add tile event in AcquisitionMonitor). tile.Group.RemoveTile(tile); } else { Trace.TraceWarning("Duplicate tile entry is missing container."); } } } } // TODO remove per above. if (tiles.Count > 0) { data.RemoveTiles(tiles); } }