NuGetReference
Represents a NuGet package reference with package identifier and version.
Herda de: BaseCodeReference
Construtores
public NuGetReference()
nuGetReference = NuGetReference()
Initializes a new instance of the NuGetReference.
public NuGetReference(IFileSystem fileSystem)
nuGetReference = NuGetReference(fileSystem)
Initializes a new instance of the NuGetReference with a custom file system.
Propriedades
public override bool IsValid { get; }
value = nuGetReference.IsValid
Gets a value indicating whether the NuGet package reference is valid.
public override string Location { get; }
value = nuGetReference.Location
Gets the location of the NuGet package reference (empty for NuGet packages).
public override string Name { get; }
value = nuGetReference.Name
Gets the display name of the NuGet package reference.
public string PackageId { get; set; }
value = nuGetReference.PackageId
nuGetReference.PackageId = value
Gets or sets the NuGet package identifier.
public string Version { get; set; }
value = nuGetReference.Version
nuGetReference.Version = value
Gets or sets the version of the NuGet package.
Métodos
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.
Retorna: A task that represents the asynchronous operation. The task result contains an enumerable of tuples with image name and image body.
public override void Load(SettingsStorage storage)
nuGetReference.Load(storage)
Loads the settings from the specified storage.
- storage
- The storage containing the settings.
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.