// General program startup initialization. Returns true if initialization was successful, false otherwise. private static bool init() { // initialize our logging support so we can log errors if (!AcDebug.initAcLogging()) { Console.WriteLine("Logging support initialization failed."); return(false); } // save an unhandled exception in log file before program terminates AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(AcDebug.unhandledException); // ensure we're logged into AccuRev Task <string> prncpl = AcQuery.getPrincipalAsync(); if (String.IsNullOrEmpty(prncpl.Result)) { AcDebug.Log($"Not logged into AccuRev.{Environment.NewLine}Please login and try again."); return(false); } // initialize our depots list class variable with select depots from WSpaceTransLevel.exe.config if (!initAppConfigData()) { return(false); } // initialize our workspaces list class variable Task <bool> wslist = initWSListAsync(); if (!wslist.Result) { AcDebug.Log($"Workspaces list initialization failed. See log file:{Environment.NewLine}{AcDebug.getLogFile()}"); return(false); } return(true); }