private static void LoadUuid(IDatabaseSettingDao dao) { string uuid = dao.GetUuid(); if (string.IsNullOrEmpty(uuid)) { UuidGenerator g = Guid.NewGuid(); uuid = g.ToString().Replace("-", ""); dao.SetUuid(uuid); } RuntimeSettings.Uuid = uuid; ExceptionReporter.Uuid = uuid; Logger.InfoFormat("Your user id is {0}, use this for any bug reports", RuntimeSettings.Uuid); }
private static void LoadUuid(IDatabaseSettingDao dao, SettingsService settings) { var uuid = settings.GetPersistent().UUID; if (string.IsNullOrEmpty(uuid)) { uuid = dao.GetUuid(); settings.GetPersistent().UUID = uuid; } if (string.IsNullOrEmpty(uuid)) { uuid = Guid.NewGuid().ToString().Replace("-", ""); settings.GetPersistent().UUID = uuid; } RuntimeSettings.Uuid = uuid; ExceptionReporter.Uuid = uuid; Logger.InfoFormat("Your user id is {0}, use this for any bug reports", RuntimeSettings.Uuid); }
public string GetUuid() { return(ThreadExecuter.Execute( () => repo.GetUuid() )); }