Esempio n. 1
0
        private void ReadNameValuePair(Dictionary <string, string> info)
        {
            _tokenizer.SetSkip(false, TokenType.WhiteSpace);
            var name = ReadUntil(TokenType.Symbol, "").Trim();

            ExpectToken("=");

            var value = ReadUntil(TokenType.NewLine, "").Trim();

            _tokenizer.SetSkip(true, TokenType.WhiteSpace);
            ReadNextToken();

            info[name] = value;
        }
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);
        }
Esempio n. 3
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);
        }