Beispiel #1
0
        static void Main(string[] args)
        {
            var ddNode = new DDNode(DrCmdConst.TypeSettings, new DDType(DrCmdConst.TypeSettings));

            ddNode.Attributes.Add(DrCmdSettings.ApplicationDescription, "It's test application.");
            ddNode.Add(GetCommandHelp());
            ddNode.Add(GetCommandRUN());


            var cmd = new DrCmdParser(ddNode);

            Console.Write(cmd.GetHelp(true));
            Console.WriteLine();
            do
            {
                Console.WriteLine("Specify arguments: ");
                var line = Console.ReadLine();
                ddNode.Attributes.Add(DrCmdSettings.Arguments, line.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries), ResolveConflict.OVERWRITE);
                SerialyzeToXml(ddNode);
            } while (!ParseSample(cmd));
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            var ddNode = new DDNode(DrCmdConst.TypeSettings, DrCmdConst.TypeSettings);
            ddNode.Attributes.Add("ApplicationDescription", "It's test application.");
            ddNode.Add(GetCommandHelp());
            ddNode.Add(GetCommandRUN());

            var cmd = new DrCmdParser(ddNode);

            Console.Write( cmd.GetHelp(true));
            Console.WriteLine();
            DDNode resDdNode ;
            do
            {
                Console.WriteLine("Specify arguments: ");
                var line = Console.ReadLine();
                ddNode.Attributes.Add(DrCmdSettings.Arguments, line.Split(new[]{' '}, StringSplitOptions.RemoveEmptyEntries), ResolveConflict.OVERWRITE);
                SerialyzeToXml(ddNode);

            } while (!ParseSample(cmd));
        }