Esempio n. 1
0
        private PackageInProject XmlToPackage(XElement el, PackagePath path)
        {
            var id      = el.Attribute("id")?.Value;
            var version = el.Attribute("version")?.Value;

            return(_packageInProjectReader.Read(id, version, path, null));
        }
Esempio n. 2
0
        private PackageInProject XmlToPackage(XNamespace ns, XElement el,
                                              PackagePath path, IEnumerable <string> projectReferences)
        {
            var id      = el.Attribute("Include")?.Value;
            var version = el.Attribute("Version")?.Value ?? el.Element(ns + "Version")?.Value;

            return(_packageInProjectReader.Read(id, version, path, projectReferences));
        }
Esempio n. 3
0
        private PackageInProject XmlToPackage(XElement el, PackagePath path)
        {
            var id = el.Attribute("Include")?.Value;

            if (id == null)
            {
                id = el.Attribute("Update")?.Value;
            }
            var version = el.Attribute("Version")?.Value ?? el.Element("Version")?.Value;

            return(_packageInProjectReader.Read(id, version, path, null));
        }
Esempio n. 4
0
        private PackageInProject XmlToPackage(XElement el, PackagePath path)
        {
            try
            {
                var id      = el.Attribute("id")?.Value;
                var version = el.Attribute("version")?.Value;

                return(_packageInProjectReader.Read(id, version, path, null));
            }
            catch (Exception ex)
            {
                _logger.Error($"Could not read package from {el} in file {path.FullName}", ex);
                return(null);
            }
        }
Esempio n. 5
0
        private PackageInProject XmlToPackage(XNamespace ns, XElement el,
                                              PackagePath path, IEnumerable <string> projectReferences)
        {
            try
            {
                var id      = el.Attribute("Include")?.Value;
                var version = el.Attribute("Version")?.Value ?? el.Element(ns + "Version")?.Value;

                return(_packageInProjectReader.Read(id, version, path, projectReferences));
            }
            catch (Exception ex)
            {
                _logger.Error($"Could not read package from {el} in file {path.FullName}", ex);
                return(null);
            }
        }
        private PackageInProject XmlToPackage(XElement el, PackagePath path)
        {
            try
            {
                var id = el.Attribute("Include")?.Value;
                if (id == null)
                {
                    id = el.Attribute("Update")?.Value;
                }
                var version = el.Attribute("Version")?.Value;

                return _packageInProjectReader.Read(id, version, path, null);
            }
            catch (Exception ex)
            {
                _logger.Error($"Could not read package from {el} in file {path.FullName}", ex);
                return null;
            }
        }