mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-05-21 00:16:35 +02:00
Version 3.0.270
This commit is contained in:
parent
67999ef4ae
commit
e0c75d5b37
81 changed files with 812 additions and 474 deletions
|
@ -17,6 +17,9 @@ namespace TINK.Model.User.Account
|
|||
/// <summary> Holds id of the mail address key. </summary>
|
||||
private const string KEY_MAILADDRESS = "MailAddress";
|
||||
|
||||
/// <summary> Holds key for flag is agb acknowledged. </summary>
|
||||
private const string KEY_ISAGBACKNOWLEDGED = "IsAgbAcknowledged";
|
||||
|
||||
public IAccount Delete(IAccount account)
|
||||
{
|
||||
SecureStorage.RemoveAll();
|
||||
|
@ -27,15 +30,16 @@ namespace TINK.Model.User.Account
|
|||
{
|
||||
|
||||
var mail = string.Empty;
|
||||
var isAgbAcknowledged = Account.DEFAULTISAGBACKNOWLEDGED;
|
||||
var sessionCookie = string.Empty;
|
||||
var debugLevel = Permissions.None;
|
||||
|
||||
try
|
||||
{
|
||||
mail = await SecureStorage.GetAsync(KEY_MAILADDRESS);
|
||||
bool.TryParse(await SecureStorage.GetAsync(KEY_ISAGBACKNOWLEDGED), out isAgbAcknowledged);
|
||||
sessionCookie = await SecureStorage.GetAsync(KEY_SESSIONCOOKIE);
|
||||
Enum.TryParse(await SecureStorage.GetAsync(KEY_DEBUGLEVEL), out debugLevel);
|
||||
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
|
@ -45,6 +49,7 @@ namespace TINK.Model.User.Account
|
|||
return new Account(
|
||||
mail,
|
||||
string.Empty,
|
||||
isAgbAcknowledged,
|
||||
sessionCookie,
|
||||
new List<string>(),
|
||||
debugLevel);
|
||||
|
@ -55,6 +60,7 @@ namespace TINK.Model.User.Account
|
|||
try
|
||||
{
|
||||
await SecureStorage.SetAsync(KEY_MAILADDRESS, mailAndPwd.Mail);
|
||||
await SecureStorage.SetAsync(KEY_ISAGBACKNOWLEDGED, mailAndPwd.IsAgbAcknowledged.ToString());
|
||||
await SecureStorage.SetAsync(KEY_SESSIONCOOKIE, mailAndPwd.SessionCookie);
|
||||
await SecureStorage.SetAsync(KEY_DEBUGLEVEL, mailAndPwd.DebugLevel.ToString());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue