コード例 #1
0
        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));
            }
        }
コード例 #2
0
        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);
        }
コード例 #3
0
 public PBDetailInfo(PBDetailType type, string value)
 {
     Type  = type;
     Value = value;
 }
コード例 #4
0
 public PBDetailInfo(string type, string value)
 {
     Type  = (PBDetailType)Enum.Parse(typeof(PBDetailType), type);
     Value = value;
 }