Exemplo n.º 1
0
 private static void ProcessXL20(DataExporterFlags flags, Type t)
 {
     foreach (var file in flags.Paths)
     {
         var xl = new XL20(File.ReadAllBytes(file), t);
         var ft = Path.ChangeExtension(file, ".json");
         File.WriteAllText(ft, JsonConvert.SerializeObject(new
         {
             xl.UnderlyingType.FullName,
             xl.Entries
         }, Formatting.Indented, new StringEnumConverter()));
         Logger.Info("XL", ft);
     }
 }
Exemplo n.º 2
0
 private static void ProcessStruct(DataExporterFlags flags, Type t)
 {
     foreach (var file in flags.Paths)
     {
         var structTable = new StructTable(File.ReadAllBytes(file));
         var ft          = Path.ChangeExtension(file, ".json");
         var Entries     = structTable.Cast(t);
         File.WriteAllText(ft, JsonConvert.SerializeObject(new
         {
             t.FullName,
             Entries
         }, Formatting.Indented, new StringEnumConverter()));
         Logger.Info("Struct", ft);
     }
 }