internal int GetItemCount(TechType techType) { var items = ContainerItems.Where(x => x.TechType == techType); return(items.Count()); }
public Dictionary <TechType, int> GetItemsWithin() { var lookup = ContainerItems?.Where(x => x != null).ToLookup(x => x.TechType).ToArray(); return(lookup?.ToDictionary(count => count.Key, count => count.Count())); }