コード例 #1
0
 public static async Task SaveAsync(string filePath, bool canEmitBom, int selector)
 {
     try
     {
         await JsonStringReaderTest.SaveAsync(filePath, canEmitBom, selector);
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex);
     }
 }
コード例 #2
0
        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);
            }
        }