Пример #1
0
        internal int GetItemCount(TechType techType)
        {
            var items = ContainerItems.Where(x => x.TechType == techType);

            return(items.Count());
        }
Пример #2
0
        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()));
        }