static void Main(string[] args) { int startAt = 0; bool slow = IsArgFound(args, SLOW); bool verboseLogging = IsArgFound(args, VERBOSE); if (IsArgFound(args, START_AT)) { startAt = GetUserNumber(args); } BingSearch.Process(slow, verboseLogging, startAt); if (!IsArgFound(args, NO_PAUSE)) { Console.WriteLine(Environment.NewLine + "Hit any key to continue...."); Console.ReadKey(); } }
public static void Process(bool slow, bool verboseLogging, int startWithUser) { Logger.Instance.IsVerbose = verboseLogging; BingSearch search = null; try { search = new BingSearch(); search.DoProcessing(slow, startWithUser); } catch (Exception exception) { Logger.Instance.Log(exception); if (search != null) { CloseBrowser(search._browserDriverCurrentSearchUser); CloseBrowser(search._browserDriverSearchText); } } }