Class PackageManagerStrategy
- Namespace
- JD.AI.Core.Installation
- Assembly
- JD.AI.Core.dll
Updates JD.AI via system package managers (winget, chocolatey, scoop, brew, apt).
public sealed class PackageManagerStrategy : IInstallStrategy
- Inheritance
-
PackageManagerStrategy
- Implements
- Inherited Members
Constructors
PackageManagerStrategy(InstallKind)
public PackageManagerStrategy(InstallKind kind)
Parameters
kindInstallKind
Properties
Name
Human-readable name for this strategy (e.g. "dotnet tool", "GitHub release").
public string Name { get; }
Property Value
Methods
ApplyAsync(string?, CancellationToken)
Applies an update (or fresh install) to the specified version, or latest if null.
public Task<InstallResult> ApplyAsync(string? targetVersion = null, CancellationToken ct = default)
Parameters
targetVersionstringctCancellationToken
Returns
GetLatestVersionAsync(CancellationToken)
Fetches the latest available version from the upstream source. Returns null on failure.
public Task<string?> GetLatestVersionAsync(CancellationToken ct = default)