예제 #1
0
        public static void Main(string [] args)
        {
            var imp = new DominoModuleXmlImporter();

            foreach (string arg in args)
            {
                imp.Import(arg).Save(Path.ChangeExtension(arg, "midimod"));
            }
        }
예제 #2
0
        public static void Main(string [] args)
        {
            var imp = new DominoModuleXmlImporter();

            foreach (string arg in args)
            {
                using (var fs = File.OpenWrite(Path.ChangeExtension(arg, "midimod")))
                    imp.Import(arg).Save(fs);
            }
        }
예제 #3
-1
 public static void Main(string [] args)
 {
     var imp = new DominoModuleXmlImporter ();
     var ds = new DataContractJsonSerializer (typeof (MidiModuleDefinition));
     foreach (string arg in args) {
         var mod = imp.Import (arg);
         var ms = new MemoryStream ();
         ds.WriteObject (ms, mod);
         ms.Position = 0;
         var s = new StreamReader (ms).ReadToEnd ();
         s = s.Replace ("},", "},\n");
         using (var sw = File.CreateText (Path.ChangeExtension (arg, "midimod")))
             sw.Write (s);
     }
 }