public bool ItemIsConfigured(string itemType, string itemKey) { if (!ItemConfig.ContainsKey(itemType)) { return(false); } HashSet <string> items = ItemConfig[itemType]; return(items.Count == 0 || (items.Contains(itemKey) && !ItemsAreExclusions[itemType]) || (!items.Contains(itemKey) && ItemsAreExclusions[itemType])); }