int OptionToMask(TypeContainer container, string options) { int mask = 0; foreach (var option in options.Split(new char[] { '|' }, System.StringSplitOptions.RemoveEmptyEntries)) { mask |= (1 << container.ConvertToInt(option)); } return(mask); }
string VerifyStrings(TypeContainer container, string options) { var list = new List <string>(); foreach (var option in options.Split(new char[] { '|' }, System.StringSplitOptions.RemoveEmptyEntries)) { if (container.ConvertToInt(option) != -1) { list.Add(option); } } return(string.Join("|", list)); }