Esempio n. 1
0
 /// <summary>
 /// Use the package manager to retrieve the set of installed and available packages.
 /// </summary>
 /// <param name="complete">Called when the query is complete.</param>
 public void QueryPackages(Action <AndroidSdkPackageCollection> complete)
 {
     SdkManagerUtil.QueryPackages(
         toolPath, "list sdk -u -e -a",
         (CommandLine.Result result) => {
         complete(result.exitCode == 0 ?
                  ParseAndroidListSdkOutput(result.stdout) : null);
     });
 }
Esempio n. 2
0
        /// <summary>
        /// Use the package manager to retrieve the set of installed and available packages.
        /// </summary>
        /// <param name="complete">Called when the query is complete.</param>
        public void QueryPackages(Action <AndroidSdkPackageCollection> complete)
        {
            bool useVerbose = Package != null &&
                              Package.Version >= MINIMUM_VERSION_FOR_VERBOSE_OUTPUT;

            SdkManagerUtil.QueryPackages(
                toolPath, "--list" + (useVerbose ? " --verbose" : ""),
                (CommandLine.Result result) => {
                complete(result.exitCode == 0 ?
                         useVerbose ? ParseListVerboseOutput(result.stdout) :
                         ParseListOutput(result.stdout) :
                         null);
            });
        }