Skip to content

Commit

Permalink
Rip the heart out of the nuget code to get this to compile
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCakeIsNaOH committed Jun 17, 2022
1 parent 8b2cd72 commit 5be7b43
Show file tree
Hide file tree
Showing 27 changed files with 342 additions and 832 deletions.
12 changes: 5 additions & 7 deletions src/chocolatey/chocolatey.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@
<Compile Include="infrastructure.app\commands\ChocolateyExportCommand.cs" />
<Compile Include="infrastructure.app\commands\ChocolateyInfoCommand.cs" />
<Compile Include="infrastructure.app\commands\ChocolateyHelpCommand.cs" />
<Compile Include="infrastructure\mockups\PackageOperationEventArgs.cs" />
<Compile Include="infrastructure\mockups\IPackageManager.cs" />
<Compile Include="infrastructure\mockups\IPackageRepository.cs" />
<Compile Include="infrastructure\mockups\PhysicalFileSystem.cs" />
<Compile Include="infrastructure\cryptography\DefaultEncryptionUtility.cs" />
<Compile Include="infrastructure\adapters\IEncryptionUtility.cs" />
<Compile Include="infrastructure.app\validations\GlobalConfigurationValidation.cs" />
Expand Down Expand Up @@ -205,6 +209,7 @@
<Compile Include="infrastructure\logging\LogMessage.cs" />
<Compile Include="infrastructure\logging\LogSinkLog.cs" />
<Compile Include="infrastructure\registration\AssemblyResolution.cs" />
<Compile Include="infrastructure\mockups\IPackage.cs" />
<Compile Include="infrastructure\synchronization\GlobalMutex.cs" />
<Compile Include="infrastructure\logging\TraceLog.cs" />
<Compile Include="infrastructure\registration\SecurityProtocol.cs" />
Expand Down Expand Up @@ -240,8 +245,6 @@
<Compile Include="infrastructure.app\domain\PinCommandType.cs" />
<Compile Include="infrastructure.app\domain\SourceCommandType.cs" />
<Compile Include="infrastructure.app\events\PostRunMessage.cs" />
<Compile Include="infrastructure.app\nuget\ChocolateyNugetCredentialProvider.cs" />
<Compile Include="infrastructure.app\nuget\ChocolateyClientCertificateProvider.cs" />
<Compile Include="infrastructure.app\nuget\NugetPush.cs" />
<Compile Include="infrastructure.app\runners\GenericRunner.cs" />
<Compile Include="infrastructure.app\services\AutomaticUninstallerService.cs" />
Expand Down Expand Up @@ -277,15 +280,10 @@
<Compile Include="infrastructure.app\domain\installers\MsiInstaller.cs" />
<Compile Include="infrastructure.app\domain\installers\NsisInstaller.cs" />
<Compile Include="infrastructure.app\domain\RegistryApplicationKey.cs" />
<Compile Include="infrastructure.app\nuget\ChocolateyLocalPackageRepository.cs" />
<Compile Include="infrastructure.app\nuget\ChocolateyNugetLogger.cs" />
<Compile Include="infrastructure.app\events\PreRunMessage.cs" />
<Compile Include="infrastructure.app\nuget\ChocolateyPackagePathResolver.cs" />
<Compile Include="infrastructure.app\nuget\ChocolateyPhysicalFileSystem.cs" />
<Compile Include="infrastructure.app\nuget\DictionaryPropertyProvider.cs" />
<Compile Include="infrastructure.app\nuget\NugetCommon.cs" />
<Compile Include="infrastructure.app\nuget\NuGetFileSystemExtensions.cs" />
<Compile Include="infrastructure.app\nuget\NugetList.cs" />
<Compile Include="infrastructure.app\nuget\NugetPack.cs" />
<Compile Include="infrastructure.app\runners\ConsoleApplication.cs" />
<Compile Include="infrastructure.app\services\ChocolateyPackageInformationService.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ namespace chocolatey.infrastructure.app.commands
using infrastructure.commands;
using infrastructure.configuration;
using logging;
using mockups;
using nuget;
using NuGet.Common;
using NuGet.Versioning;
Expand Down Expand Up @@ -147,7 +148,7 @@ public virtual void noop(ChocolateyConfiguration configuration)

public virtual void run(ChocolateyConfiguration configuration)
{
var packageManager = NugetCommon.GetPackageManager(configuration, _nugetLogger,
/*var packageManager = NugetCommon.GetPackageManager(configuration, _nugetLogger,
new PackageDownloader(),
installSuccessAction: null,
uninstallSuccessAction: null,
Expand All @@ -161,9 +162,9 @@ public virtual void run(ChocolateyConfiguration configuration)
case PinCommandType.remove:
set_pin(packageManager, configuration);
break;
}
}*/
}

/*
public virtual void list_pins(IPackageManager packageManager, ChocolateyConfiguration config)
{
var input = config.Input;
Expand All @@ -189,7 +190,7 @@ public virtual void set_pin(IPackageManager packageManager, ChocolateyConfigurat
var addingAPin = config.PinCommand.Command == PinCommandType.add;
this.Log().Info("Trying to {0} a pin for {1}".format_with(config.PinCommand.Command.to_string(), config.PinCommand.Name));
var versionUnspecified = string.IsNullOrWhiteSpace(config.Version);
SemanticVersion semanticVersion = versionUnspecified ? null : new SemanticVersion(config.Version);
SemanticVersion semanticVersion = versionUnspecified ? null : new SemanticVersion(SemanticVersion.Parse(config.Version));
IPackage installedPackage = packageManager.LocalRepository.FindPackage(config.PinCommand.Name, semanticVersion);
if (installedPackage == null)
{
Expand Down Expand Up @@ -222,7 +223,7 @@ public virtual void set_pin(IPackageManager packageManager, ChocolateyConfigurat
this.Log().Warn(NO_CHANGE_MESSAGE);
}
}

*/
public virtual bool may_require_admin_access()
{
var config = Config.get_configuration_settings();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@

namespace chocolatey.infrastructure.app.domain
{
using mockups;
using NuGet;
using NuGet.Versioning;
using results;

public sealed class ChocolateyPackageInformation
{
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 5be7b43

Please sign in to comment.