WriteSchema() публичный Метод

Writes a schema for each type in the assembly
public WriteSchema ( string assembly, string lookup_type, string output_dir ) : void
assembly string
lookup_type string
output_dir string
Результат void
Пример #1
0
                static void Main (string [] args) {

                        if (args.Length < 1) {
                                Console.WriteLine (helpString);
                                Environment.Exit (0);
                        }

                        string input = args [0];
                        string lookup_type = null;
                        string output_dir = null;

                        if (input.EndsWith (".dll") || input.EndsWith (".exe")) {

                                if (args.Length >= 2 && args [1].StartsWith ("/o"))
                                        output_dir = args [1].Substring (args [1].IndexOf (':') + 1);

                                if (args.Length >= 3 && args [2].StartsWith ("/t"))
                                        lookup_type = args [2].Substring (args [2].IndexOf (':') + 1);

                                MonoXSD xsd = new MonoXSD ();

                                try {
                                        xsd.WriteSchema (input, lookup_type, output_dir);
                                } catch (ArgumentException e) {
                                        Console.WriteLine (e.Message + "\n");
                                        Environment.Exit (0);
                                }
                        } else {
                                Console.WriteLine ("Not supported.");
                                return;
                        }
                }
Пример #2
0
        static void Main(string [] args)
        {
            if (args.Length < 1)
            {
                Console.WriteLine(helpString);
                Environment.Exit(0);
            }

            string input       = args [0];
            string lookup_type = null;
            string output_dir  = null;

            if (input.EndsWith(".dll") || input.EndsWith(".exe"))
            {
                if (args.Length >= 2 && args [1].StartsWith("/o"))
                {
                    output_dir = args [1].Substring(args [1].IndexOf(':') + 1);
                }

                if (args.Length >= 3 && args [2].StartsWith("/t"))
                {
                    lookup_type = args [2].Substring(args [2].IndexOf(':') + 1);
                }

                MonoXSD xsd = new MonoXSD();

                try {
                    xsd.WriteSchema(input, lookup_type, output_dir);
                } catch (ArgumentException e) {
                    Console.WriteLine(e.Message + "\n");
                    Environment.Exit(0);
                }
            }
            else
            {
                Console.WriteLine("Not supported.");
                return;
            }
        }