private static async Task GetVersionsAsync()

in JetBrains.Profiler.SelfApi/src/Impl/NuGet.cs [357:374]


      private static async Task<PackageIndex> GetVersionsAsync(
        HttpClient http,
        Uri indexUrl,
        CancellationToken cancellationToken)
      {
        Trace.Info("NuGet.V3.GetVersions: {0}", indexUrl);
        using (var response = await http
          .GetAsync(indexUrl, HttpCompletionOption.ResponseHeadersRead, cancellationToken)
          .ConfigureAwait(false))
        {
          response.EnsureSuccessStatusCode();
          using (var indexJson = await response.Content.ReadAsStreamAsync().ConfigureAwait(false))
          {
            return (PackageIndex) new DataContractJsonSerializer(typeof(PackageIndex))
              .ReadObject(indexJson);
          }
        }
      }