Example #1
0
 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());
 }
Example #2
0
 public IContainable GetContainable(string containableName)
 {
     return(Editables.Where(e => e.Name == containableName).OfType <IContainable>().FirstOrDefault()
            ?? Containers.Where(c => c.Name == containableName).FirstOrDefault());
 }