NuGetReference

Ecng.Compilation

Represents a NuGet package reference with package identifier and version.

Hereda de: BaseCodeReference

Constructores

NuGetReference
public NuGetReference()
nuGetReference = NuGetReference()

Initializes a new instance of the NuGetReference.

NuGetReference
public NuGetReference(IFileSystem fileSystem)
nuGetReference = NuGetReference(fileSystem)

Initializes a new instance of the NuGetReference with a custom file system.

Propiedades

IsValid
public override bool IsValid { get; }
value = nuGetReference.IsValid

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

Location
public override string Location { get; }
value = nuGetReference.Location

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

Name
public override string Name { get; }
value = nuGetReference.Name

Gets the display name of the NuGet package reference.

PackageId
public string PackageId { get; set; }
value = nuGetReference.PackageId
nuGetReference.PackageId = value

Gets or sets the NuGet package identifier.

Version
public string Version { get; set; }
value = nuGetReference.Version
nuGetReference.Version = value

Gets or sets the version of the NuGet package.

Métodos

GetImages
public override ValueTask<IEnumerable<ValueTuple<string, byte[]>>> GetImages(CancellationToken cancellationToken)
result = nuGetReference.GetImages(cancellationToken)

Asynchronously retrieves the images associated with the code reference.

cancellationToken
The token to monitor for cancellation requests.

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

LoadAsync
public override Task LoadAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = nuGetReference.LoadAsync(storage, cancellationToken)

Loads the settings from the specified storage.

storage
The storage containing the settings.
cancellationToken
CancellationToken

Devuelve: Task

SaveAsync
public override Task SaveAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = nuGetReference.SaveAsync(storage, cancellationToken)

Saves the settings to the specified storage.

storage
The storage where the settings will be saved.
cancellationToken
CancellationToken

Devuelve: Task