public IEnumerable <IUniquelyNamed> GetNamed(string name) { return(Editables.Where(e => e.Name == name).OfType <IUniquelyNamed>() .Union(Containers.Where(c => c.Name == name).OfType <IUniquelyNamed>()) .Union(Displayables.Where(d => d.Name == name).OfType <IUniquelyNamed>()) .ToList()); }
public IContainable GetContainable(string containableName) { return(Editables.Where(e => e.Name == containableName).OfType <IContainable>().FirstOrDefault() ?? Containers.Where(c => c.Name == containableName).FirstOrDefault()); }