private static void Draw() { foreach (var vo in vectorObjects) { foreach (var line in vo) { var adapter = new LineToPointAdapter(line); adapter.ForEach(DrawPoint); } } }
public void Run() { var vectorObjects = new List <VectorObject> { new VectorRectangle(1, 1, 10, 10), new VectorRectangle(3, 3, 6, 6) }; foreach (var vecorObject in vectorObjects) { foreach (var line in vecorObject) { var adapter = new LineToPointAdapter(line); adapter.ForEach(DrawPoint); } } }