DeleteEntry() private method

private DeleteEntry ( System.Xml.Linq.XDocument document, string id, SemanticVersion version ) : bool
document System.Xml.Linq.XDocument
id string
version SemanticVersion
return bool
Example #1
0
 public void RemovePackage(IPackage package)
 {
     if (_packageReferenceFile.DeleteEntry(package.Id, package.Version))
     {
         // Remove the repository from the source
         SourceRepository.UnregisterRepository(_packageReferenceFile);
     }
 }
        public override void RemovePackage(IPackage package)
        {
            base.RemovePackage(package);

            if (_packageReferenceFile != null)
            {
                _packageReferenceFile.DeleteEntry(package.Id, package.Version);
            }
        }
        public override void RemovePackage(IPackage package)
        {
            string packageFilePath = GetManifestFilePath(package);

            if (FileSystem.FileExists(packageFilePath))
            {
                // delete .nuspec file
                FileSystem.DeleteFileSafe(packageFilePath);
            }

            // call the base class to delete .nupkg file if there is one
            base.RemovePackage(package);

            if (_packageReferenceFile != null)
            {
                _packageReferenceFile.DeleteEntry(package.Id, package.Version);
            }
        }
Example #4
0
 public void DeleteEntry(string id, SemanticVersion version)
 {
     file.DeleteEntry(id, version);
 }
 //writes new version of the package to packages.config file
 public void writeToConfig(string fileName, string packageId, SemanticVersion newversion)
 {
     var file = new PackageReferenceFile(fileName);
     file.DeleteEntry(packageId, null);
     file.AddEntry(packageId, newversion);
 }