public async Task <string> Gettoken() { string path = AppDomain.CurrentDomain.BaseDirectory + "token" + ".txt"; string token = await ClientHttpController.GetToken(); return(token); }
public async void Get_Token() { string path = AppDomain.CurrentDomain.BaseDirectory + "token" + ".txt"; string token = await ClientHttpController.GetToken(); if (!File.Exists(path)) { using (StreamWriter sw = File.CreateText(path)) { sw.WriteLine(token); } } else { using (StreamWriter sw = File.AppendText(path)) { sw.WriteLine(token); } } }