internal ProjectConverterUtil(string filePath, Dictionary <string, string> packageMap, HashSet <string> isFixedMap)
 {
     _projectUtil     = new ProjectUtil(filePath);
     _msbuildDocument = _projectUtil.MSBuildDocument;
     _namespace       = _msbuildDocument.Namespace;
     _packageMap      = packageMap;
     _isFixedMap      = isFixedMap;
     _filePath        = filePath;
     _document        = _projectUtil.Document;
 }
Beispiel #2
0
        private static List <(string name, string version)> ParsePackages(XDocument doc)
        {
            var msbuildDoc = new MSBuildDocument(doc);
            var group      = msbuildDoc.XPathSelectElements("PropertyGroup").Single();

            var list = new List <(string name, string version)>();

            foreach (var e in group.Elements())
            {
                list.Add((e.Name.LocalName, e.Value.Trim()));
            }

            return(list);
        }