public static HssStatus Int_to_Status(int val) { Helper_hssStatus.Init(); if (!Helper_hssStatus.int_dic.ContainsKey(val)) { return(HssStatus.None); } else { return(Helper_hssStatus.int_dic[val]); } }
public static HssStatus Str_to_Status(string s) { Helper_hssStatus.Init(); if (string.IsNullOrEmpty(s)) { return(HssStatus.None); } s = s.Trim(); if (Helper_hssStatus.str_dic.ContainsKey(s)) { return(Helper_hssStatus.str_dic[s]); } else { return(HssStatus.None);//more work may be needed in the future } }