コード例 #1
0
        public static void Main(string[] args)
        {
            CommandLineOptions options = new CommandLineOptions();

            if (Parser.Default.ParseArguments(args, options))
            {
                if ((!string.IsNullOrEmpty(options.IndexFolderPath)) && (options.Create) && (!string.IsNullOrEmpty(options.ToIndexFolderPath)))
                {
                    IndexHelpers.CreateOrAppendIndex(options.IndexFolderPath, options.ToIndexFolderPath, options.Verbose);
                    return;
                }

                if ((!string.IsNullOrEmpty(options.IndexFolderPath)) && (!string.IsNullOrEmpty(options.SearchTerm)))
                {
                    IndexHelpers.SearchIndex(options.IndexFolderPath, options.SearchTerm);
                    return;
                }

                Console.WriteLine("Invalid combination of options entered.");
            }
        }
コード例 #2
0
 internal static void CreateOrAppendIndex(string indexFolderPath, string toIndexFolderPath, bool verbose)
 {
     IndexHelpers.UpdateIndex(ParseFolderTree(new System.IO.DirectoryInfo(toIndexFolderPath), verbose), indexFolderPath);
 }