/// <summary> /// Deletes an authenticated account from storage. /// </summary> /// <param name="type">Enum type representing the web account to delete.</param> private void DeleteUsersWebAccountDetails(WebAccountTypes type) { Platform.Current.Storage.SaveSetting("WAM_" + type.ToString(), null, ApplicationData.Current.RoamingSettings, SerializerTypes.Json); }
/// <summary> /// Indicates whether or not an account is stored in storage. /// </summary> /// <param name="type">Enum type of the web account to check if stored info exists or not.</param> /// <returns>True if stored info exists else false.</returns> private bool HasWebAccountInfo(WebAccountTypes type) { return Platform.Current.Storage.ContainsSetting("WAM_" + type.ToString(), ApplicationData.Current.RoamingSettings); }
/// <summary> /// Retrieves an authenticated account details from storage. /// </summary> /// <param name="type"></param> /// <returns>WebAccountInfo instance if found else null.</returns> private WebAccountInfo GetWebAccountInfo(WebAccountTypes type) { return Platform.Current.Storage.LoadSetting<WebAccountInfo>("WAM_" + type.ToString(), ApplicationData.Current.RoamingSettings, SerializerTypes.Json); }
/// <summary> /// Deletes an authenticated account from storage. /// </summary> /// <param name="type">Enum type representing the web account to delete.</param> private void DeleteUsersWebAccountDetails(WebAccountTypes type) { PlatformBase.CurrentCore.Storage.SaveSetting("WAM_" + type.ToString(), null, ApplicationData.Current.RoamingSettings, SerializerTypes.Json); }
/// <summary> /// Indicates whether or not an account is stored in storage. /// </summary> /// <param name="type">Enum type of the web account to check if stored info exists or not.</param> /// <returns>True if stored info exists else false.</returns> private bool HasWebAccountInfo(WebAccountTypes type) { return(PlatformBase.CurrentCore.Storage.ContainsSetting("WAM_" + type.ToString(), ApplicationData.Current.RoamingSettings)); }
/// <summary> /// Retrieves an authenticated account details from storage. /// </summary> /// <param name="type"></param> /// <returns>WebAccountInfo instance if found else null.</returns> private WebAccountInfo GetWebAccountInfo(WebAccountTypes type) { return(PlatformBase.CurrentCore.Storage.LoadSetting <WebAccountInfo>("WAM_" + type.ToString(), ApplicationData.Current.RoamingSettings, SerializerTypes.Json)); }