VersionToUse() public method

public VersionToUse ( string id ) : Version
id string
return Version
        private void UpdateReferenceVersions(ProjectDocument project)
        {
            Console.Write("Updating reference versions... ");

            foreach (var reference in project.GetBinaryReferences())
            {
                // skip assemblies from GAC
                if (reference.IsGlobal)
                {
                    continue;
                }

                // skip remote packages
                if (!m_checker.IsLocal(reference.Name))
                {
                    continue;
                }

                // skip static packages
                if (m_checker.IsStatic(reference.Name))
                {
                    continue;
                }

                // package should be pinned to its current version
                if (m_checker.IsPinnedToCurrentVersion(reference.Name))
                {
                    continue;
                }

                // get version to use for local package
                var versionToUse = m_checker.VersionToUse(reference.Name);

                // update is not required
                if (versionToUse.Normalize() == reference.Version.Normalize())
                {
                    continue;
                }

                // update package version within project file
                reference.UpdateVersion(versionToUse);
            }

            Console.WriteLine("OK");
        }
        private void UpdatePackageVersions(PackagesConfig config)
        {
            Console.Write("Updating package versions... ");

            foreach (var element in config.AllPackages())
            {
                var package = element.AsPackage();

                // skip remote packages
                if (!m_checker.IsLocal(package.Id))
                {
                    continue;
                }

                // skip static packages
                if (m_checker.IsStatic(package.Id))
                {
                    continue;
                }

                // package should be pinned to its current version
                if (m_checker.IsPinnedToCurrentVersion(package.Id))
                {
                    continue;
                }

                // get version to use for local package
                var versionToUse = m_checker.VersionToUse(package.Id);

                // update is not required
                if (versionToUse.Normalize() == package.Version.Normalize())
                {
                    continue;
                }

                // update package version within packages configuration
                element.Attribute("version").Value = versionToUse.ToString();
            }

            Console.WriteLine("OK");
        }