Ejemplo n.º 1
0
 /// <summary>
 /// Clears the local package folder.
 /// </summary>
 public static void ClearLocalPackageFolder(string packageId)
 {
     string packageVersion = ClientSDKHelper.GetLatestStableVersion(packageId);
     string expectedDownloadedNupkgFileName = packageId + "." + packageVersion;
     string pathToNupkgFolder = Path.Combine(Environment.CurrentDirectory, expectedDownloadedNupkgFileName);
     Console.WriteLine("Path to the downloaded Nupkg file for clearing local package folder is: " + pathToNupkgFolder);
     if(Directory.Exists(pathToNupkgFolder))
         Directory.Delete(expectedDownloadedNupkgFileName, true);
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Clears the local package folder.
        /// </summary>
        public static void ClearLocalPackageFolder(string packageId)
        {
            string packageVersion = ClientSDKHelper.GetLatestStableVersion(packageId);
            string expectedDownloadedNupkgFileName = packageId + "." + packageVersion;

            if (Directory.Exists(Path.Combine(Environment.CurrentDirectory, expectedDownloadedNupkgFileName)))
            {
                Directory.Delete(expectedDownloadedNupkgFileName, true);
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Given a package checks if it is installed properly in the current dir.
        /// </summary>
        /// <param name="packageId"></param>
        /// <returns></returns>
        public static bool CheckIfPackageInstalled(string packageId)
        {
            string packageVersion = ClientSDKHelper.GetLatestStableVersion(packageId);

            return(CheckIfPackageVersionInstalled(packageId, packageVersion));
        }