C# Класс Microsoft.PackageManagement.NuGetProvider.PackageUtility

Utility that can be used to handle the packaged related actions.
Показать файл Открыть проект

Приватные методы

Метод Описание
DecompressFile ( string nupkgFilePath, string packageName ) : PackageBase

Unzip the .nupkg file and read the .nuspec manifest.

DecompressFile ( string fullZipPath ) : string

Unzip the file

EnsureRequiredXmlTags ( PackageBase package ) : void

Make sure the Nuget required xml tags exist within the metadata tag in the nuspec file.

ExtractId ( string longId ) : string

Extract the package id. From the feed, the package id is equal to something like this "http://www.nuget.org/api/v2/Packages(Id='jQuery',Version='2.1.3')". But we need id='jQuery'.

GetDateTime ( string dateTime ) : DateTimeOffset?
GetPackageNameWithoutVersionInfo ( string packageName ) : string

Get the package name without version info

ParseDependency ( string value ) : Tuple

Parses a dependency from the feed in the format: id or id:versionSpec, or id:versionSpec:targetFramework

ParseDependencySet ( string value ) : List

Parse the dependency set from string value (returned from nuget api call)

ProcessNuspec ( System.Xml.Linq.XDocument rootDocument ) : PackageBase

Utility to parse the nuspec file and produces the package object.

ProcessNuspec ( string nuspecFileFullPath ) : PackageBase

Utility to parse the nuspec file and produces the package object.

ProcessPackagesFeed ( Stream stream ) : IEnumerable
ReadDependencies ( System.Xml.Linq.XElement containerElement ) : List

Read the dependencies from xelement. Returns a list of dependencies

ReadDependencyList ( System.Xml.Linq.XElement dependenciesElement ) : List

Parse dependencies from the xelement and returns a list of PackageDependencySet

ReadEntryChildNode ( PackageBase &package, System.Xml.Linq.XElement element ) : void

Parse the children of the 'entry' tag.

ReadEntryElement ( PackageBase &package, System.Xml.Linq.XElement xElement ) : void

Parse the 'entry' xml element.

ReadNuSpecFromNuPkg ( string nupkgPath ) : System.Xml.Linq.XDocument

Read .nuspec manifest from the .nupkg package file.

ReadPackageMetadata ( PackageBase &package, System.Xml.Linq.XElement xElement ) : void

A help for processing the metadata tag

ReadPackageMetadataElement ( PackageBase &package, System.Xml.Linq.XElement element ) : void

A helper method for processing the children of the 'metadata' tag in the .nuspec file