public static async Task LoadAsync(string filePath, bool canAcceptBom) { try { var result = await JsonStringReaderTest.LoadAsync(filePath, canAcceptBom); Console.WriteLine(result); } catch (Exception ex) { Console.WriteLine(ex); } }
public static async Task SaveLoadAsync(bool canEmitBom, int selector) { var filePath = Path.GetTempFileName(); try { await JsonStringReaderTest.SaveAsync(filePath, canEmitBom, selector); var result = await JsonStringReaderTest.LoadAsync(filePath, true); Console.WriteLine(result); } catch (Exception ex) { Console.WriteLine(ex); } }