private static MarbleDiagram GetDiagram(MarbleDiagramTree tree, string name) { var mi = tree.Items.FirstOrDefault(m => m.Name == name); if (mi == null) { mi = new MarbleDiagram() { Name = name }; tree.Items.Add(mi); } return mi; }
private static MarbleDiagram GetDiagram(MarbleDiagramTree tree, string name) { var mi = tree.Items.FirstOrDefault(m => m.Name == name); if (mi == null) { mi = new MarbleDiagram() { Name = name }; tree.Items.Add(mi); } return(mi); }