Beispiel #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);
     }
 }
Beispiel #2
0
 public static void Load(string filePath, bool canAcceptBom)
 {
     try
     {
         var result = JsonStringReaderTest.Load(filePath, canAcceptBom);
         Console.WriteLine(result);
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex);
     }
 }
Beispiel #3
0
        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);
            }
        }
Beispiel #4
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);
            }
        }