public void Test_SaveToJson()
 {
     var table = PrepareTable();
     var saver = new TemplateTableJsonSaver<int, TestObject>();
     var json = saver.SaveToJson(table);
     Assert.NotNull(json);
 }
        public void Test_SaveToJson()
        {
            var table = PrepareTable();
            var saver = new TemplateTableJsonSaver <int, TestObject>();
            var json  = saver.SaveToJson(table);

            Assert.NotNull(json);
        }
Exemple #3
0
 private void Save()
 {
     var saver = new TemplateTableJsonSaver<string, CardDescription>(
         new JsonSerializerSettings
         {
             Formatting = Formatting.Indented,
             DefaultValueHandling = DefaultValueHandling.Ignore,
             Converters = new List<JsonConverter> { new StringEnumConverter() },
         });
     var json2 = saver.SaveToJson(_cardTable);
     File.WriteAllText("CardTableSaved.json", json2);
 }
Exemple #4
0
        private void Save()
        {
            var saver = new TemplateTableJsonSaver <string, CardDescription>(
                new JsonSerializerSettings
            {
                Formatting           = Formatting.Indented,
                DefaultValueHandling = DefaultValueHandling.Ignore,
                Converters           = new List <JsonConverter> {
                    new StringEnumConverter()
                },
            });
            var json2 = saver.SaveToJson(_cardTable);

            File.WriteAllText("CardTableSaved.json", json2);
        }