Esempio n. 1
0
        private static void ConvertToXml(Options options)
        {
            string path = options.InputFile;
            VerifyPath(path, "sln");

            var tokenizer = new SlnTokenizer(File.ReadAllText(path));
            tokenizer.Initialise();
            tokenizer.SetSkip(true, TokenType.WhiteSpace);

            SolutionParser solutionParser = new SolutionParser(tokenizer);
            var document = solutionParser.Execute();

            var converter = new SlnToXmlConverter();
            string outputName = !String.IsNullOrEmpty(options.OutputFile) ? options.OutputFile : ConvertInput(path);
            converter.WriteDocument(document, outputName);
        }
Esempio n. 2
0
        private static void ConvertToXml(Options options)
        {
            string path = options.InputFile;

            VerifyPath(path, "sln");

            var tokenizer = new SlnTokenizer(File.ReadAllText(path));

            tokenizer.Initialise();
            tokenizer.SetSkip(true, TokenType.WhiteSpace);

            SolutionParser solutionParser = new SolutionParser(tokenizer);
            var            document       = solutionParser.Execute();

            var    converter  = new SlnToXmlConverter();
            string outputName = !String.IsNullOrEmpty(options.OutputFile) ? options.OutputFile : ConvertInput(path);

            converter.WriteDocument(document, outputName);
        }