Beispiel #1
0
 public UserSetting(object parent, XElement userSetting)
     : base(parent, userSetting)
 {
     _xmlProfileHelper = new XmlProfileHelper(ProfileCache, userSetting);
     SearchPath        = _xmlProfileHelper.Fetch("Parameters", "SearchPath");
     Criteria          = _xmlProfileHelper.Fetch("Parameters", "Criteria");
     DirFilesEstimate  = _xmlProfileHelper.FetchLong("Parameters", "DirFilesEstimate");
     FilePattern       = _xmlProfileHelper.Fetch("Parameters", "FilePattern");
     RegexCriteria     = _xmlProfileHelper.FetchBool("Parameters", "RegexCriteria");
     MethodBlocks      = _xmlProfileHelper.FetchBool("Parameters", "MethodBlocks");
     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);
     }
 }
Beispiel #2
0
 public CommandSetting(object parent, XElement commandSetting)
     : base(parent, commandSetting)
 {
     _xmlProfileHelper = new XmlProfileHelper(ProfileCache, commandSetting);
     Line     = _xmlProfileHelper.Fetch("Command", "Line");
     Template = _xmlProfileHelper.Fetch("Command", "Template");
 }
Beispiel #3
0
 public RepositorySetting(object parent, XElement repositorySetting)
     : base(parent, repositorySetting)
 {
     _xmlProfileHelper = new XmlProfileHelper(ProfileCache, repositorySetting);
     Name      = _xmlProfileHelper.Fetch("Repository", "Name");
     RemoteUrl = _xmlProfileHelper.Fetch("Repository", "RemoteUrl");
     LocalPath = _xmlProfileHelper.Fetch("Repository", "LocalPath");
 }
 public TemplateParameterSetting(object parent, XElement templateParameterSetting)
     : base(parent, templateParameterSetting)
 {
     _xmlProfileHelper = new XmlProfileHelper(ProfileCache, templateParameterSetting);
     Value             = _xmlProfileHelper.Fetch("Group", "Value");
     try
     {
         Description = _xmlProfileHelper.Fetch("Group", "Description");
     }
     catch (Exception ex)
     {
         Description = string.Empty;
     }
 }
Beispiel #5
0
 public UserSetting(object parent, XElement userSetting)
     : base(parent, userSetting)
 {
     _shrink = new ShrinkDir();
     _shrink.MaxDisplayLength = 49;
     _xmlProfileHelper        = new XmlProfileHelper(ProfileCache, userSetting);
     NewPath             = _xmlProfileHelper.Fetch("Directories", "NewPath");
     OldPath             = _xmlProfileHelper.Fetch("Directories", "OldPath");
     NewFilesEstimate    = _xmlProfileHelper.FetchInt("Directories", "NewFilesEstimate");
     OldFilesEstimate    = _xmlProfileHelper.FetchInt("Directories", "OldFilesEstimate");
     ChgFilesEstimate    = _xmlProfileHelper.FetchInt("Directories", "ChgFilesEstimate");
     KeyShrunk           = "[" + _shrink.ShrinkDirectory(NewPath) + "]-[" + _shrink.ShrinkDirectory(OldPath) + "]";
     IgnoreFileExtension = _xmlProfileHelper.FetchBool("Options", "IgnoreFileExtension");
     MonitoredTypesOnly  = _xmlProfileHelper.FetchBool("Options", "MonitoredTypesOnly");
 }
Beispiel #6
0
 public DiffUserSetting(object parent, XElement userSetting)
     : base(parent, userSetting)
 {
     _shrink = new ShrinkDir();
     _shrink.MaxDisplayLength = 49;
     _xmlProfileHelper        = new XmlProfileHelper(ProfileCache, userSetting);
     NewBaseDir        = _xmlProfileHelper.Fetch("Directories", "NewBaseDir");
     OldBaseDir        = _xmlProfileHelper.Fetch("Directories", "OldBaseDir");
     NewFile           = _xmlProfileHelper.Fetch("Files", "NewFile");
     OldFile           = _xmlProfileHelper.Fetch("Files", "OldFile");
     KeyShrunk         = "[" + _shrink.ShrinkDirectory(NewFile) + "]-[" + _shrink.ShrinkDirectory(OldFile) + "]";
     MinChars          = _xmlProfileHelper.FetchInt("Options", "MinChars");
     MinLines          = _xmlProfileHelper.FetchInt("Options", "MinLines");
     LimitCharacters   = _xmlProfileHelper.FetchInt("Options", "LimitCharacters");
     LimitLines        = _xmlProfileHelper.FetchInt("Options", "LimitLines");
     SubLineMatchLimit = _xmlProfileHelper.FetchInt("Options", "SubLineMatchLimit");
     CompleteLines     = _xmlProfileHelper.FetchBool("Options", "CompleteLines");
 }
Beispiel #7
0
 public ParameterSetting(object parent, XElement parameterSetting)
     : base(parent, parameterSetting)
 {
     _xmlProfileHelper = new XmlProfileHelper(ProfileCache, parameterSetting);
     Value             = _xmlProfileHelper.Fetch("Group", "Value");
 }