コード例 #1
0
        /// <summary>
        /// Generates and writes the LSL Syntax helper data to stdout
        /// </summary>
        /// <param name="args"></param>
        public static void Main(string[] args)
        {
            List<string> argsList = new List<string>(args);
            ArgvParser argv = new ArgvParser(args);

            string format = argv["format"].ToLower();
            string function = argv["function"] != null ? argv["function"].ToLower() : string.Empty;

            switch (format)
            {
                case "json":
                    Console.Write(JSON(function));
                    break;
                case "xml":
                case "llsd":
                    Console.Write(LLSD(function));
                    break;
                case "mediawiki":
                    if (function == string.Empty)
                    {
                        Console.Write(MediaWiki(2,
                                argsList.Contains("--hide-documented")));
                    }
                    else
                    {
                        Console.Write(MediaWiki(function));
                    }
                    break;
                default:
                    Console.Error.Write("Unsupported format specified");
                    break;
            }
        }
コード例 #2
0
 /// <include file='ArgvConfigSource.xml' path='//Constructor[@name="Constructor"]/docs/*' />
 public ArgvConfigSource(string[] arguments)
 {
     parser = new ArgvParser (arguments);
     this.arguments = arguments;
 }