using System.Collections.Generic; namespace FL.Data { public class PartnerPlan { public int id { get; private set; } public string name { get; private set; } /// /// key 位置 : value 槽位信息 /// private Dictionary planMap = new Dictionary(); public Dictionary.ValueCollection planValues { get { return planMap.Values; } } public void Init(int id, string name, List planList) { this.id = id; this.name = name; foreach (var slot in planList) { planMap.Add(slot.caoId, slot); } } public PartnerPlanSlot GetSlot(int slotId) { return planMap.GetValueOrDefault(slotId); } } }