public static string GetSetting(AppPrefrences prefrence) { bool hasKey = Preferences.ContainsKey(EnumsHelper.ConvertToString(prefrence)); if (hasKey) { return(Preferences.Get(EnumsHelper.ConvertToString(prefrence), null)); } return(null); }
public static async Task SetSecureSetting(AppPrefrences prefrence, string setting) { try { await SecureStorage.SetAsync(EnumsHelper.ConvertToString(prefrence), setting); } catch (Exception ex) { // Possible that device doesn't support secure storage on device. Debug.WriteLine(ex.Message); } }
public static void RemoveSecureSetting(AppPrefrences prefrence) { SecureStorage.Remove(EnumsHelper.ConvertToString(prefrence)); }
public static async Task <string> GetSecureSetting(AppPrefrences prefrence) { return(await SecureStorage.GetAsync(EnumsHelper.ConvertToString(prefrence))); }
public static void RemoveSetting(AppPrefrences prefrence) { Preferences.Remove(EnumsHelper.ConvertToString(prefrence)); }
public static void AddSetting(AppPrefrences prefrence, string setting) { Preferences.Set(EnumsHelper.ConvertToString(prefrence), setting); }