Convert PowerShell helper functions to C#
Checklist
- I have verified this is the correct repository for opening this issue.
- I have verified no other issues exist related to my request.
Is Your Feature Request Related To A Problem? Please describe.
Within the Chocolatey Licensed Extension, we extend the functionality that is provided by some of the Chocolatey PowerShell functions, for example for the Package Throttle feature, which means changing how the Get-WebFile function works.
Extending this functionality can be problematic as it deals with switching between PowerShell and C#, and there are no direct entry points to provide this additional functionality.
Describe The Solution. Why is it needed?
We should convert all the Chocolatey PowerShell Functions, i.e. the Install-ChocolateyPath.ps1 to be a C# CmdLets.
This will allow for better inheritance/overloading of Chocolatey functionality within things like the Chocolatey Licensed Extension, as well as providing the necessary entry points to extend the functionality as/when required.
In addition, this will prevent duplication of code between Chocolatey CLI and CLE.
Additional Context
N/A
Related Issues
Tasks
- #3539
- Format-FileSize.ps1
- Get-CheckSumValid.ps1 - https://github.com/chocolatey/choco/pull/3525
- Get-ChocolateyConfigValue.ps1 - https://github.com/chocolatey/choco/pull/3663
- Get-ChocolateyPath.ps1 - https://github.com/chocolatey/choco/pull/3646
- Get-ChocolateyUnzip.ps1
- Get-ChocolateyWebFile.ps1
- Get-EnvironmentVariable.ps1
- Get-EnvironmentVariableNames.ps1
- Get-FtpFile.ps1
- Get-OSArchitectureWidth.ps1
- Get-PackageParameters.ps1
- Get-ToolsLocation.ps1
- Get-UACEnabled.ps1
- Get-UninstallRegistryKey.ps1
- Get-VirusCheckValid.ps1
- Get-WebFile.ps1
- Get-WebFileName.ps1
- Install-BinFile.ps1
- Install-ChocolateyEnvironmentVariable.ps1
- Install-ChocolateyExplorerMenuItem.ps1
- Install-ChocolateyFileAssociation.ps1
- Install-ChocolateyInstallPackage.ps1
- Install-ChocolateyPackage.ps1
- Install-ChocolateyPath.ps1
- Install-ChocolateyPinnedTaskBarItem.ps1
- Install-ChocolateyPowerShellCommand.ps1
- Install-ChocolateyShortcut.ps1
- Install-ChocolateyVsixPackage.ps1
- Install-Vsix.ps1
- Set-EnvironmentVariable.ps1
- Set-PowerShellExitCode.ps1
- Start-ChocolateyProcessAsAdmin.ps1
- Test-ProcessAdminRights.ps1
- Uninstall-BinFile.ps1
- Uninstall-ChocolateyEnvironmentVariable.ps1
- Uninstall-ChocolateyPackage.ps1
- Uninstall-ChocolateyZipPackage.ps1
- Update-SessionEnvironment.ps1
- Write-FunctionaCallLogMessage.ps1
- Before next release: ensure all associated docs PRs (https://github.com/chocolatey/docs/issues/1074) are merged
- Before next release: ensure we update the
Chocolatey.PowerShell.dll-help.xmlexternal help file in this repository after the docs PRs are merged
┆Issue is synchronized with this Clickup task by Unito
Source: chocolatey/choco