예제 #1
0
        public async Task <bool> LoadTokensFromStorageAsync()
        {
            var accounts = await AccountStorage.FindAccountsForServiceAsync();

            if (accounts.Count < 1)
            {
                return(false);
            }
            else if (accounts.Count > 1)
            {
                throw new InvalidOperationException("Only single account storage supported");
            }

            // Set Account loaded from storage
            UpdateTokensFromAccount(accounts.First());
            return(true);
        }