NuGetPackageAnalyzer
Namespace: Dotsider.Core.Analysis
Assembly: Dotsider.Core.dll
Opens and analyzes a NuGet package (.nupkg) file. Reads package metadata from .nuspec and lists all contents.
public sealed class NuGetPackageAnalyzer : IDisposableInheritance
Section titled “Inheritance”Object → NuGetPackageAnalyzer
Implements
Section titled “Implements”Constructors
Section titled “Constructors”NuGetPackageAnalyzer(string)
Section titled “NuGetPackageAnalyzer(string)”Opens and analyzes the specified NuGet package file.
Parameters:
nupkgPath(String): Path to the .nupkg file.
public NuGetPackageAnalyzer(string nupkgPath)Properties
Section titled “Properties”Authors
Section titled “Authors”The raw, untrusted package authors from the .nuspec manifest, or null. This value is not display-safe.
Returns: String
public string? Authors { get; }Description
Section titled “Description”The raw, untrusted package description from the .nuspec manifest, or null. This value is not display-safe.
Returns: String
public string? Description { get; }DllFiles
Section titled “DllFiles”Only the DLL files in the package.
Returns: IReadOnlyList<NuGetFileEntry>
public IReadOnlyList<NuGetFileEntry> DllFiles { get; }FileName
Section titled “FileName”The file name of the .nupkg file.
Returns: String
public string FileName { get; }FilePath
Section titled “FilePath”The full path to the .nupkg file.
Returns: String
public string FilePath { get; }All files in the package.
Returns: IReadOnlyList<NuGetFileEntry>
public IReadOnlyList<NuGetFileEntry> Files { get; }PackageId
Section titled “PackageId”The raw, untrusted NuGet package ID from the .nuspec manifest, or null. This value is not display-safe.
Returns: String
public string? PackageId { get; }PackageVersion
Section titled “PackageVersion”The raw, untrusted package version from the .nuspec manifest, or null. This value is not display-safe.
Returns: String
public string? PackageVersion { get; }Methods
Section titled “Methods”Dispose()
Section titled “Dispose()”public void Dispose()OpenDll(NuGetFileEntry)
Section titled “OpenDll(NuGetFileEntry)”Extracts a DLL from the package into a private temporary directory and creates an analyzer.
Parameters:
entry(NuGetFileEntry): The exact NuGetFileEntry instance returned by this analyzer.
Returns: AssemblyAnalyzer
An analyzer for the selected DLL. Dispose it before disposing this package analyzer.
Exceptions:
- ArgumentNullException: entry is null.
- ArgumentException: entry was not returned by this analyzer or does not represent a DLL.
- UnsafePackageEntryException: The package entry has an unsafe or ambiguous extraction path.
- ObjectDisposedException: This analyzer has been disposed.
- IOException: The DLL could not be extracted or read.
- BadImageFormatException: The extracted file has an invalid format.
public AssemblyAnalyzer OpenDll(NuGetFileEntry entry)