C# Class AzureIoTHubConnectedService.NuGetUtilities

NuGet package utilities.
ファイルを表示 Open project: Azure/azure-iot-hub-vs-cs

Public Methods

Method Description
GetPackageRepositoryPath ( string repositoryName ) : string

Get local repository folder path from registory: HKLM\Software\NuGet\Repository

InstallPackagesAsync ( string>.Dictionary packages, string extensionId, ConnectedServiceLogger logger, Project project, IVsPackageInstallerServices packageInstallerServices, IVsPackageInstaller packageInstaller ) : System.Threading.Tasks.Task

Ensures the appropriate version of the specified packages are installed. If an existing version of the package already exists the following will happen: If a semantically compatible version already exists, no change is made to the package. If an older major version exists, a warning is logged and the package is upgraded. If an older minor/build version exists, an information message is logged and the package is upgraded. If a newer major version exists, a warning is logged and no change is made to the package.

InstallPackagesAsync ( Project targetProject, string>.Dictionary packages, Func installPackage, ConnectedServiceLogger logger, IVsPackageInstallerServices packageInstallerServices ) : System.Threading.Tasks.Task

Ensures the appropriate version of the specified packages are installed. If an existing version of the package already exists the following will happen: If a semantically compatible version already exists, no change is made to the package. If an older major version exists, a warning is logged and the package is upgraded. If an older minor/build version exists, an information message is logged and the package is upgraded. If a newer major version exists, a warning is logged and no change is made to the package.

UninstallPackagesAsync ( Project targetProject, ISet packages, Task>.Func uninstallPackage, ConnectedServiceLogger logger, IVsPackageInstallerServices packageInstallerServices ) : System.Threading.Tasks.Task

Uninstall the packages that exist in the project.

Private Methods

Method Description
GetVersion ( string versionString ) : System.Version

Method Details

GetPackageRepositoryPath() public static method

Get local repository folder path from registory: HKLM\Software\NuGet\Repository
public static GetPackageRepositoryPath ( string repositoryName ) : string
repositoryName string
return string

InstallPackagesAsync() public static method

Ensures the appropriate version of the specified packages are installed. If an existing version of the package already exists the following will happen: If a semantically compatible version already exists, no change is made to the package. If an older major version exists, a warning is logged and the package is upgraded. If an older minor/build version exists, an information message is logged and the package is upgraded. If a newer major version exists, a warning is logged and no change is made to the package.
public static InstallPackagesAsync ( string>.Dictionary packages, string extensionId, ConnectedServiceLogger logger, Project project, IVsPackageInstallerServices packageInstallerServices, IVsPackageInstaller packageInstaller ) : System.Threading.Tasks.Task
packages string>.Dictionary
extensionId string
logger ConnectedServiceLogger
project Project
packageInstallerServices IVsPackageInstallerServices
packageInstaller IVsPackageInstaller
return System.Threading.Tasks.Task

InstallPackagesAsync() public static method

Ensures the appropriate version of the specified packages are installed. If an existing version of the package already exists the following will happen: If a semantically compatible version already exists, no change is made to the package. If an older major version exists, a warning is logged and the package is upgraded. If an older minor/build version exists, an information message is logged and the package is upgraded. If a newer major version exists, a warning is logged and no change is made to the package.
public static InstallPackagesAsync ( Project targetProject, string>.Dictionary packages, Func installPackage, ConnectedServiceLogger logger, IVsPackageInstallerServices packageInstallerServices ) : System.Threading.Tasks.Task
targetProject Project
packages string>.Dictionary
installPackage Func
logger ConnectedServiceLogger
packageInstallerServices IVsPackageInstallerServices
return System.Threading.Tasks.Task

UninstallPackagesAsync() public static method

Uninstall the packages that exist in the project.
public static UninstallPackagesAsync ( Project targetProject, ISet packages, Task>.Func uninstallPackage, ConnectedServiceLogger logger, IVsPackageInstallerServices packageInstallerServices ) : System.Threading.Tasks.Task
targetProject Project
packages ISet
uninstallPackage Task>.Func
logger ConnectedServiceLogger
packageInstallerServices IVsPackageInstallerServices
return System.Threading.Tasks.Task