示例#1
0
        public static T ParseArguments <T>(string input, out string output) where T : class, new()
        {
            var oldOut       = Console.Out;
            var stringWriter = new System.IO.StringWriter();

            Console.SetOut(stringWriter);
            var result = PowerCommandParser.Parser.ParseArguments <T>(TestHelper.CmdLineEntryParser(input));

            Console.Out.Flush();
            Console.SetOut(oldOut);
            output = stringWriter.ToString();

            return(result);
        }