public UserSetting(object parent, XElement userSetting) : base(parent, userSetting) { _xmlProfileHelper = new XmlProfileHelper(ProfileCache, userSetting); SearchPath = _xmlProfileHelper.Fetch("Parameters", "SearchPath"); Criteria = _xmlProfileHelper.Fetch("Parameters", "Criteria"); Find = _xmlProfileHelper.Fetch("Parameters", "Find"); Replacement = _xmlProfileHelper.Fetch("Parameters", "Replacement"); Mode = _xmlProfileHelper.Fetch("Parameters", "Mode"); DirFilesEstimate = _xmlProfileHelper.FetchLong("Parameters", "DirFilesEstimate"); FilePattern = _xmlProfileHelper.Fetch("Parameters", "FilePattern"); RegexCriteria = _xmlProfileHelper.FetchBool("Parameters", "RegexCriteria"); AllTypes = _xmlProfileHelper.FetchBool("Parameters", "AllTypes"); Encoding = GetEnumValue <SearchEncoding>(_xmlProfileHelper.Fetch("Parameters", "Encoding")); Options = new StringCollection(); foreach (string opt in userSetting.Descendants("Option")) { Options.Add(opt); } Extensions = new StringCollection(); foreach (string ext in userSetting.Descendants("Extension")) { Extensions.Add(ext); } DirectoryExclusions = new StringCollection(); foreach (string exclusion in userSetting.Descendants("DirectoryExclusion")) { DirectoryExclusions.Add(exclusion); } }