NuGetReference

Ecng.Compilation

Represents a NuGet package reference with package identifier and version.

継承元: BaseCodeReference

コンストラクター

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.

プロパティ

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.

メソッド

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.

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

Load
public override void Load(SettingsStorage storage)
nuGetReference.Load(storage)

Loads the settings from the specified storage.

storage
The storage containing the settings.
Save
public override void Save(SettingsStorage storage)
nuGetReference.Save(storage)

Saves the settings to the specified storage.

storage
The storage where the settings will be saved.