Class NuspecCoreReaderBase
A very basic Nuspec reader that understands the Id, Version, PackageType, and MinClientVersion of a package.
public abstract class NuspecCoreReaderBase : INuspecCoreReader
- Inheritance
-
NuspecCoreReaderBase
- Implements
- Derived
- Inherited Members
Constructors
NuspecCoreReaderBase(Stream)
Read a nuspec from a stream.
public NuspecCoreReaderBase(Stream stream)
Parameters
stream
Stream
NuspecCoreReaderBase(Stream, bool)
Read a nuspec from a stream.
public NuspecCoreReaderBase(Stream stream, bool leaveStreamOpen)
Parameters
NuspecCoreReaderBase(string)
Read a nuspec from a path.
public NuspecCoreReaderBase(string path)
Parameters
path
string
NuspecCoreReaderBase(XDocument)
Reads a nuspec from XML
public NuspecCoreReaderBase(XDocument xml)
Parameters
xml
XDocument
Fields
DevelopmentDependency
protected const string DevelopmentDependency = "developmentDependency"
Field Value
Id
protected const string Id = "id"
Field Value
Metadata
protected const string Metadata = "metadata"
Field Value
MinClientVersion
protected const string MinClientVersion = "minClientVersion"
Field Value
Version
protected const string Version = "version"
Field Value
Properties
MetadataNode
protected XElement MetadataNode { get; }
Property Value
- XElement
MetadataValues
Indexed metadata values of the XML elements in the nuspec. If duplicate keys exist only the first is used.
protected Dictionary<string, string> MetadataValues { get; }
Property Value
Xml
Raw XML doc
public XDocument Xml { get; }
Property Value
- XDocument
Methods
GetDevelopmentDependency()
The developmentDependency attribute
public virtual bool GetDevelopmentDependency()
Returns
GetId()
Id of the package
public virtual string GetId()
Returns
GetIdentity()
Id and Version of a package.
public virtual PackageIdentity GetIdentity()
Returns
GetMetadata()
Nuspec Metadata
public virtual IEnumerable<KeyValuePair<string, string>> GetMetadata()
Returns
GetMetadataValue(string)
Returns a nuspec metadata value or string.Empty.
public virtual string GetMetadataValue(string name)
Parameters
name
string
Returns
GetMinClientVersion()
The minimum client version this package supports.
public virtual NuGetVersion GetMinClientVersion()
Returns
- NuGetVersion
GetPackageTypes()
Gets zero or more package types from the .nuspec.
public virtual IReadOnlyList<PackageType> GetPackageTypes()
Returns
GetVersion()
Version of the package
public virtual NuGetVersion GetVersion()
Returns
- NuGetVersion
IsServiceable()
Returns if the package is serviceable.
public virtual bool IsServiceable()