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
Location
Gets the location of the NuGet package reference (empty for NuGet packages).
public override string Location { get; }
Property Value
Name
Gets the display name of the NuGet package reference.
public override string Name { get; }
Property Value
PackageId
Gets or sets the NuGet package identifier.
public string PackageId { get; set; }
Property Value
Version
Gets or sets the version of the NuGet package.
public string Version { get; set; }
Property Value
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
CancellationTokenThe 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
SettingsStorageThe storage containing the settings.
Save(SettingsStorage)
Saves the settings to the specified storage.
public override void Save(SettingsStorage storage)
Parameters
storage
SettingsStorageThe storage where the settings will be saved.