static IEnumerable <KeyValuePair <AllocationGroups, int> > GetBaseCounts() { var allBlocks = ArmData.GetAllBlocks(); var returnVar = new List <KeyValuePair <AllocationGroups, int> >(allBlocks.Count); foreach (var a in allBlocks) { returnVar.Add(new KeyValuePair <AllocationGroups, int>(a.Key, a.Value.Ratios.Values.Sum())); } return(returnVar); }
static IEnumerable <KeyValuePair <AllocationGroups, int> > GetBaseCounts(RandomisationArm arm) { var allBlocks = ArmData.GetAllBlocks(); var returnVar = new List <KeyValuePair <AllocationGroups, int> >(allBlocks.Count); foreach (var a in allBlocks) { if (a.Value.Ratios.TryGetValue(arm, out int v)) { returnVar.Add(new KeyValuePair <AllocationGroups, int>(a.Key, v)); } } return(returnVar); }