private string GetFileName() { var appDataFolder = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData); return(System.IO.Path.Combine(appDataFolder, ExeUtils.GetAssemblyCompany(), ExeUtils.GetAssemblyTitle(), "CompleteMoments.dat")); }
public void Run() { try { if (!ExeUtils.IsSingleInstance()) { throw new UserException(string.Format("Only one instance of {0} is allowed!", ExeUtils.GetAssemblyTitle())); } var config = _configResolver.GetConfig(); _replicationWorker.Run(config); } catch (RouteNotSpecifiedException e) { OutputHelp(e.Message); } catch (AggregateException e) { if (e.Flatten().InnerExceptions.Where(x => x is RouteNotSpecifiedException).Any()) { OutputHelp(e.Flatten().InnerExceptions.Where(x => x is RouteNotSpecifiedException).First().Message); } else { throw; } } }