public Settings(string s, CMSDataContext Db, int OrgId) : this() { this.Db = Db; this.OrgId = OrgId; org = Db.LoadOrganizationById(OrgId); var parser = new Parser(s); while (parser.NextSection()) { ParseSection(parser); } SetUniqueIds("AskDropdown"); SetUniqueIds("AskExtraQuestions"); SetUniqueIds("AskCheckboxes"); SetUniqueIds("AskText"); SetUniqueIds("AskMenu"); var sglist = new List <string>(); AskItems.ForEach(a => sglist.AddRange(a.SmallGroups())); var q = sglist.GroupBy(mi => mi).Where(g => g.Count() > 1).Select(g => g.Key).ToList(); if (q.Any()) { throw parser.GetException("Duplicate SmallGroup: " + string.Join(",", q)); } parser.data = null; }
public Settings(string s, CMSDataContext Db, int OrgId) : this() { this.Db = Db; this.OrgId = OrgId; org = Db.LoadOrganizationById(OrgId); var parser = new Parser(s); while (parser.NextSection()) ParseSection(parser); SetUniqueIds("AskDropdown"); SetUniqueIds("AskExtraQuestions"); SetUniqueIds("AskCheckboxes"); SetUniqueIds("AskMenu"); var sglist = new List<string>(); AskItems.ForEach(a => sglist.AddRange(a.SmallGroups())); var q = sglist.GroupBy(mi => mi).Where(g => g.Count() > 1).Select(g => g.Key).ToList(); if (q.Any()) throw parser.GetException("Duplicate SmallGroup: " + string.Join(",", q)); parser.data = null; }