nuget client v1
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
<PackageVersion Include="Microsoft.VisualStudio.Shared.VSCodeDebugProtocol" Version="18.0.10427.1" />
|
||||
<PackageVersion Include="Microsoft.VisualStudio.SolutionPersistence" Version="1.0.52" />
|
||||
<PackageVersion Include="MudBlazor" Version="8.12.0" />
|
||||
<PackageVersion Include="NuGet.Protocol" Version="7.0.0-preview.1.46008" />
|
||||
<PackageVersion Include="NuGet.Protocol" Version="7.1.0-preview.1.42" />
|
||||
<PackageVersion Include="ObservableCollections" Version="3.3.4" />
|
||||
<PackageVersion Include="ObservableCollections.R3" Version="3.3.4" />
|
||||
<PackageVersion Include="Photino.Blazor" Version="4.0.13" />
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
using NuGet.Configuration;
|
||||
using SharpIDE.Application.Features.SolutionDiscovery.VsPersistence;
|
||||
|
||||
namespace SharpIDE.Application.Features.Nuget;
|
||||
|
||||
public class NugetClientService
|
||||
{
|
||||
public async Task Test(string directoryPath)
|
||||
{
|
||||
var settings = Settings.LoadDefaultSettings(root: directoryPath);
|
||||
var packageSourceProvider = new PackageSourceProvider(settings);
|
||||
var packageSources = packageSourceProvider.LoadPackageSources().Where(p => p.IsEnabled).ToList();
|
||||
|
||||
// Get top 100 packages across all sources, ordered by download count
|
||||
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,7 @@ using SharpIDE.Application.Features.Evaluation;
|
||||
using SharpIDE.Application.Features.FilePersistence;
|
||||
using SharpIDE.Application.Features.FileWatching;
|
||||
using SharpIDE.Application.Features.NavigationHistory;
|
||||
using SharpIDE.Application.Features.Nuget;
|
||||
using SharpIDE.Application.Features.Run;
|
||||
using SharpIDE.Application.Features.Search;
|
||||
|
||||
@@ -36,6 +37,7 @@ public partial class DiAutoload : Node
|
||||
services.AddScoped<IdeApplyCompletionService>();
|
||||
services.AddScoped<FileChangedService>();
|
||||
services.AddScoped<DotnetUserSecretsService>();
|
||||
services.AddScoped<NugetClientService>();
|
||||
services.AddScoped<IdeFileWatcher>();
|
||||
services.AddScoped<IdeNavigationHistoryService>();
|
||||
services.AddScoped<IdeOpenTabsFileManager>();
|
||||
|
||||
@@ -18,6 +18,7 @@ public partial class BottomPanelManager : Panel
|
||||
{
|
||||
field = value;
|
||||
_problemsPanel.Solution = value;
|
||||
_nugetPanel.Solution = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using Godot;
|
||||
using SharpIDE.Application.Features.Nuget;
|
||||
using SharpIDE.Application.Features.SolutionDiscovery.VsPersistence;
|
||||
|
||||
namespace SharpIDE.Godot.Features.Nuget;
|
||||
|
||||
@@ -7,11 +9,21 @@ public partial class NugetPanel : Control
|
||||
private VBoxContainer _installedPackagesVboxContainer = null!;
|
||||
private VBoxContainer _implicitlyInstalledPackagesItemList = null!;
|
||||
private VBoxContainer _availablePackagesItemList = null!;
|
||||
|
||||
public SharpIdeSolutionModel? Solution { get; set; }
|
||||
|
||||
[Inject] private readonly NugetClientService _nugetClientService = null!;
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
_installedPackagesVboxContainer = GetNode<VBoxContainer>("%InstalledPackagesVBoxContainer");
|
||||
_implicitlyInstalledPackagesItemList = GetNode<VBoxContainer>("%ImplicitlyInstalledPackagesVBoxContainer");
|
||||
_availablePackagesItemList = GetNode<VBoxContainer>("%AvailablePackagesVBoxContainer");
|
||||
|
||||
_ = Task.GodotRun(async () =>
|
||||
{
|
||||
await Task.Delay(300);
|
||||
await _nugetClientService.Test(Solution!.DirectoryPath);
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user