public void SetValue(PBDetailType dType, string value) { var info = Infos.Find(t => t.Type == dType); if (info != null) { info.Value = value; } else { Infos.Add(new PBDetailInfo(dType, value)); } }
public string GetValue(PBDetailType dType) { if (Infos == null) { return(null); } var info = Infos.Find(t => t.Type == dType); if (info != null) { return(info.Value); } return(null); }
public PBDetailInfo(PBDetailType type, string value) { Type = type; Value = value; }
public PBDetailInfo(string type, string value) { Type = (PBDetailType)Enum.Parse(typeof(PBDetailType), type); Value = value; }