/// <summary>
        /// Verifies that a package has been previously installed as well as
        /// currently existing locally with all dependencies, and if so,
        /// adds it back to the outgoing cache file along with all it's
        /// previously calculated dependencies.
        /// </summary>
        public bool VerifyPackage(PackageIdentity packageIdentity, NuGetPackageManager packageManager)
        {
            CachedPackage cached = _cachedPackages.FirstOrDefault(x =>
                                                                  x.PackageReference.PackageIdentity.Id.Equals(packageIdentity.Id, StringComparison.OrdinalIgnoreCase) &&
                                                                  x.PackageReference.PackageIdentity.Version.Equals(packageIdentity.Version));

            if (cached != null && cached.VerifyPackage(packageManager))
            {
                _installedPackages.Add(cached);
                return(true);
            }
            return(false);
        }