public async Task <string> GetTokenAsync() { log.Debug("Getting a token."); if (!token.HasValue) { log.Debug("Loading the token from a storage."); var value = await tokenStorage.FindAsync(); await ChangeTokenAsync(value); } log.Debug($"Returning a token '{token.Value}'."); return(token.Value); }
private async Task LoadAndApplyTokenAsync() { var value = await tokenStorage.FindAsync(); await ChangeTokenAsync(value); }