private static void CreateIndex(ICodeSearcherLogic logic) { logic.CreateNewIndex(() => { ShowCreateNewIndexHeader(); }, (name) => { AsyncLogger.WriteLine(name); }, (fileCount, timeSpan) => { Console.ForegroundColor = ConsoleColor.DarkGreen; Console.WriteLine(); Console.WriteLine(">> building search index finished!"); Console.WriteLine("{0} files indexed", fileCount); Console.WriteLine(">> action take : {0:00}:{1:00}:{2:00}.{3:000}", timeSpan.Hours, timeSpan.Minutes, timeSpan.Seconds, timeSpan.Milliseconds); Console.WriteLine(); Console.ForegroundColor = ConsoleColor.White; }); }