static void Main(string[] args) { clip = new CommandLinePreferences(); clip.ProcessArgs(args); if (clip.Verbosity > 0) { ConsoleColour.SetForeGroundColour(ConsoleColour.ForeGroundColour.Green, true); Console.Write("Searcharoo.Indexer"); ConsoleColour.SetForeGroundColour(ConsoleColour.ForeGroundColour.Red, true); Console.WriteLine(" v0.3"); ConsoleColour.SetForeGroundColour(); } ConsoleWriteLine(1, "======================="); Spider spider = new Spider(); spider.SpiderProgressEvent += new SpiderProgressEventHandler(OnProgressEvent); spider.SpiderProgressEvent += new SpiderProgressEventHandler(OnProgressLogEvent); string[] startPages = Preferences.StartPage.Split(new char[] { ',', ';' }); Uri[] uris = new Uri[startPages.Length]; for (int i = 0; i < startPages.Length; i++) { uris[i] = new Uri(startPages[i]); } Catalog catalog = null; if (uris.Length == 1) { // legacy behaviour, just for testing/comparison catalog = spider.BuildCatalog(new Uri(Preferences.StartPage)); } else { // multiple start Uris allowed catalog = spider.BuildCatalog(uris); } ConsoleWriteLine(1, "======================="); #if DEBUG //System.Threading.Thread.Sleep(30 * 1000); // 30 seconds ConsoleWriteLine(1, "Press <enter> to finish..."); if (clip.Verbosity > 0) { Console.Read(); } #endif }
static void Main(string[] args) { clip = new CommandLinePreferences(); ConsoleWriteLine(1, "Searcharoo.Indexer v0.1"); clip.ProcessArgs(args); ConsoleWriteLine(1, "======================="); Spider spider = new Spider(); spider.SpiderProgressEvent += new SpiderProgressEventHandler(OnProgressEvent); spider.SpiderProgressEvent += new SpiderProgressEventHandler(OnProgressLogEvent); Catalog catalog = spider.BuildCatalog(new Uri(Preferences.StartPage)); ConsoleWriteLine(1, "======================="); #if DEBUG //System.Threading.Thread.Sleep(30 * 1000); // 30 seconds ConsoleWriteLine(1, "Press <enter> to finish..."); if (clip.Verbosity > 0) { Console.Read(); } #endif }
static void Main(string[] args) { clip = new CommandLinePreferences(); clip.ProcessArgs(args); if (clip.Verbosity > 0) { ConsoleColour.SetForeGroundColour(ConsoleColour.ForeGroundColour.Green, true); Console.Write("Searcharoo.Indexer"); ConsoleColour.SetForeGroundColour(ConsoleColour.ForeGroundColour.Red, true); Console.WriteLine(" v0.3"); ConsoleColour.SetForeGroundColour(); } ConsoleWriteLine(1, "======================="); Spider spider = new Spider(); spider.SpiderProgressEvent += new SpiderProgressEventHandler(OnProgressEvent); spider.SpiderProgressEvent += new SpiderProgressEventHandler(OnProgressLogEvent); string[] startPages = Preferences.StartPage.Split(new char[] { ',',';'}); Uri[] uris = new Uri[startPages.Length]; for (int i = 0; i < startPages.Length; i++) { uris[i] = new Uri(startPages[i]); } Catalog catalog = null; if (uris.Length == 1) { // legacy behaviour, just for testing/comparison catalog = spider.BuildCatalog(new Uri(Preferences.StartPage)); } else { // multiple start Uris allowed catalog = spider.BuildCatalog(uris); } ConsoleWriteLine(1, "======================="); #if DEBUG //System.Threading.Thread.Sleep(30 * 1000); // 30 seconds ConsoleWriteLine(1, "Press <enter> to finish..."); if (clip.Verbosity > 0) Console.Read(); #endif }