Skip to content

Instantly share code, notes, and snippets.

@pictos
Created March 12, 2019 19:41
Show Gist options
  • Save pictos/928c31832361d1511c6e6fe218513772 to your computer and use it in GitHub Desktop.
Save pictos/928c31832361d1511c6e6fe218513772 to your computer and use it in GitHub Desktop.
public static async Task SaveSessionAsync(string json)
{
try
{
File = Path.Combine(FileSystem.AppDataDirectory, "login.json");
using (var file = new FileStream(File, FileMode.Create))
using (var output = new StreamWriter(file, Encoding.UTF8))
await output.WriteAsync(json);
}
catch (System.Exception ex)
{
throw ex;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment