Пример #1
0
        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);
        }
Пример #2
0
        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);
        }
Пример #3
0
 public string GetUuid()
 {
     return(ThreadExecuter.Execute(
                () => repo.GetUuid()
                ));
 }