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
Exemplo n.º 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);
            }
        }
Exemplo n.º 3
0
        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);
            }
        }
Exemplo n.º 4
0
 public void DeleteEntry(string id, SemanticVersion version)
 {
     file.DeleteEntry(id, version);
 }
Exemplo n.º 5
0
 //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);
 }