public virtual void CollectResources(IList <ResourcePtr> ResourceCollector) { foreach (IHasResources AC in AllComponents.Where(x => x is IHasResources)) { AC.CollectResources(ResourceCollector); } }
public List <Lamp> GetAllLamps() { return(AllComponents.Where(x => x is Lamp).Cast <Lamp>().ToList()); }
public List <Switch> GetAllSwitches() { return(AllComponents.Where(x => x is Switch).Cast <Switch>().ToList()); }