static Guid GetGuid(string key)
        {
            var value = Preferences2.Get(key, null);

            if (!(!string.IsNullOrWhiteSpace(value) && ShortGuid.TryParse(value, out Guid guid)))
            {
                guid = Guid.NewGuid();
                Preferences2.Set(key, guid.ToStringS());
            }
            return(guid);
        }
        static string Get(string key)
        {
            var value = Preferences2.Get(key, null);

            if (string.IsNullOrWhiteSpace(value))
            {
                value = Random2.GenerateRandomString(DeviceIdRLength, _Constants.DigitsLetters);
                Preferences2.Set(key, value);
            }
            return(value);
        }
 static void WriteHistory(string key, IEnumerable <string> history)
 => Preferences2.Set(key, string.Join("|", history), sharedName);