コード例 #1
0
        private void ParseSolutionConfig(string configText, string rootDir)
        {
            Log.Heading("Parsing main solution document");
            using (new CompositeDisposable(
                       new Log.ScopedIndent(),
                       new Log.ScopedTimer(Log.Level.Info, "Parse Solution Config")))
            {
                IResult <ConfigDocument> result = DocumentParser.Document.TryParse(configText);
                if (!result.WasSuccessful)
                {
                    throw new DocumentParseException("<in-memory>", $"Solution config could not be parsed: {result}");
                }

                ConfigDoc = result.Value;
                Reader    = new DocumentReader(ConfigDoc, rootDir);
                Reader.ParseSolution();
                Solution = Reader.Solution;

                Log.Info("Finished parsing solution named '{0}'", Reader.Solution.Name);
            }
        }