5 // Lluis Sanchez Gual (lluis@ximian.com)
7 // Copyright (C) 2003 Ximian, Inc.
11 using System.Xml.Serialization;
13 using System.Reflection;
17 static void Main (string[] args)
19 if (args.Length == 0 || args[0] == "--help")
21 Console.WriteLine ("Mono Xml Serializer Generator Tool");
22 Console.WriteLine ("Usage: genxs ConfigFileName [DestinationPath]");
29 Type t = Type.GetType ("System.Xml.Serialization.SerializationCodeGenerator, System.Xml");
30 if (t == null) throw new Exception ("This runtime does not support generation of serializers");
32 MethodInfo met = t.GetMethod ("Generate", BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
33 met.Invoke (null, new object[] {args[0], (args.Length > 1) ? args[1] : null} );
37 Console.WriteLine ("An error occurred while generating serializers: " + ex);