public SingleLetterConfig(string bigString) : base() { LabelDatas = bigString.Select(x => { var label = x.ToString(); int labelAsInt = Convert.ToInt32(StringResources.LetterToByteMapping[label]); string labelAsFolderName = StringResources.LetterMapping[label]; LabelData ld = new LabelData(label, (byte)labelAsInt, labelAsFolderName); return(ld); }).ToList(); }
public TwoLetterConfig() : base() { string all_letters_first = "abcdefghijklmnopqrstuvwxyz"; string all_letters_second = "abcdefghijklmnopqrstuvwxyz"; int index = 0; all_letters_first.ToList().ForEach(first_letter => { List <string> matched_letters_second = all_letters_second.ToList().Where(x => !first_letter.Equals(x)).Select(x => x.ToString()).ToList(); matched_letters_second.ForEach(second_letter => { var label = first_letter + second_letter; var ld = new LabelData(label, (byte)index, label); LabelDatas.Add(ld); index++; }); }); if (LabelDatas.Count != 650) { throw new Exception("two letters config should have size of 650"); } }