Skip to content

Commit 618e760

Browse files
committed
Add LoadAvailablePaths to IPackageManager
1 parent 70d49d1 commit 618e760

3 files changed

Lines changed: 8 additions & 18 deletions

File tree

src/UniGetUI.PAckageEngine.Interfaces/IPackageManager.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,11 @@ public interface IPackageManager
6868
/// an example
6969
/// </summary>
7070
public void AttemptFastRepair();
71+
72+
/// <summary>
73+
/// Find all available executable files that apply to this package manager
74+
/// </summary>
75+
/// <returns></returns>
76+
public IReadOnlyList<string> LoadAvailablePaths();
7177
}
7278
}

src/UniGetUI.PackageEngine.PackageManagerClasses/Manager/Classes/NullPackageManager.cs

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -60,49 +60,33 @@ public NullPackageManager()
6060
};
6161
Dependencies = [];
6262
}
63-
6463
public IReadOnlyList<IPackage> FindPackages(string query) => throw new NotImplementedException();
65-
6664
public IReadOnlyList<IPackage> GetAvailableUpdates() => throw new NotImplementedException();
67-
6865
public IReadOnlyList<IPackage> GetInstalledPackages() => throw new NotImplementedException();
69-
7066
public void Initialize() => throw new NotImplementedException();
71-
7267
public bool IsEnabled() => throw new NotImplementedException();
73-
7468
public bool IsReady() => throw new NotImplementedException();
75-
7669
public void RefreshPackageIndexes() => throw new NotImplementedException();
77-
7870
public void AttemptFastRepair() => throw new NotImplementedException();
71+
public IReadOnlyList<string> LoadAvailablePaths() => throw new NotImplementedException();
7972
}
8073

8174
internal class NullSourceHelper : IMultiSourceHelper
8275
{
8376
public ISourceFactory Factory => throw new NotImplementedException();
84-
8577
public string[] GetAddSourceParameters(IManagerSource source) => throw new NotImplementedException();
86-
8778
public string[] GetRemoveSourceParameters(IManagerSource source) => throw new NotImplementedException();
88-
8979
public OperationVeredict GetAddOperationVeredict(IManagerSource source, int ReturnCode, string[] Output) => throw new NotImplementedException();
90-
9180
public OperationVeredict GetRemoveOperationVeredict(IManagerSource source, int ReturnCode, string[] Output) => throw new NotImplementedException();
92-
9381
public IReadOnlyList<IManagerSource> GetSources() => throw new NotImplementedException();
9482
}
9583

9684
internal sealed class NullPkgDetailsHelper : IPackageDetailsHelper
9785
{
9886
public void GetDetails(IPackageDetails details) => throw new NotImplementedException();
99-
10087
public IReadOnlyList<string> GetVersions(IPackage package) => throw new NotImplementedException();
101-
10288
public CacheableIcon? GetIcon(IPackage package) => throw new NotImplementedException();
103-
10489
public IReadOnlyList<Uri> GetScreenshots(IPackage package) => throw new NotImplementedException();
105-
10690
public string? GetInstallLocation(IPackage package) => throw new NotImplementedException();
10791
}
10892

src/UniGetUI/Pages/SettingsPages/ManagersPages/PackageManager.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ protected override void OnNavigatedTo(NavigationEventArgs e)
8989

9090
ManagerLogsLabel.Text = CoreTools.Translate("View {0} logs", Manager.DisplayName);
9191

92-
HashSet<string> Paths = ((PackageManager)Manager).LoadAvailablePaths();
92+
var Paths = Manager.LoadAvailablePaths();
9393
var (CurrentlyExists, CurrentPath) = ((PackageManager)Manager).GetManagerExecutablePath();
9494
foreach (string Path in Paths)
9595
{

0 commit comments

Comments
 (0)