Table of Contents

Class NuGetReference

Namespace
Ecng.Compilation
Assembly
Ecng.Compilation.dll

Represents a NuGet package reference with package identifier and version.

public class NuGetReference : BaseCodeReference, ICodeReference, IPersistable
Inheritance
NuGetReference
Implements
Inherited Members
Extension Methods

Constructors

NuGetReference()

public NuGetReference()

Properties

IsValid

Gets a value indicating whether the NuGet package reference is valid.

public override bool IsValid { get; }

Property Value

bool

Location

Gets the location of the NuGet package reference (empty for NuGet packages).

public override string Location { get; }

Property Value

string

Name

Gets the display name of the NuGet package reference.

public override string Name { get; }

Property Value

string

PackageId

Gets or sets the NuGet package identifier.

public string PackageId { get; set; }

Property Value

string

Version

Gets or sets the version of the NuGet package.

public string Version { get; set; }

Property Value

string

Methods

GetImages(CancellationToken)

Asynchronously retrieves the images associated with the code reference.

public override ValueTask<IEnumerable<(string name, byte[] body)>> GetImages(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

The token to monitor for cancellation requests.

Returns

ValueTask<IEnumerable<(string name, byte[] body)>>

A task that represents the asynchronous operation. The task result contains an enumerable of tuples with image name and image body.

Load(SettingsStorage)

Loads the settings from the specified storage.

public override void Load(SettingsStorage storage)

Parameters

storage SettingsStorage

The storage containing the settings.

Save(SettingsStorage)

Saves the settings to the specified storage.

public override void Save(SettingsStorage storage)

Parameters

storage SettingsStorage

The storage where the settings will be saved.