示例#1
0
 public async Task ThrowsOnNull()
 {
     SourceRepository repository = null;
     await Assert.ThrowsAsync <ArgumentNullException>("repository", () => repository.GetRecentPackagesAsync());
 }
示例#2
0
        /// <summary>
        /// Visualizes the upgradeable dependencies of the packages in the specified repository.
        /// </summary>
        /// <param name="repository">The repository.</param>
        /// <param name="targetFramework">The framework to find compatible package dependencies.</param>
        /// <returns>The graph of the upgradeable dependencies of the packages in the repository.</returns>
        /// <exception cref="ArgumentNullException"><paramref name="repository"/> is <c>null</c>.</exception>
        /// <seealso cref="IEnumerablePackageIdentityExtensions.VisualizeUpgradeableDependenciesAsync(IEnumerable{PackageIdentity}, SourceRepository, NuGetFramework)"/>
        public static async Task <DirectedGraph> VisualizeUpgradeableDependenciesAsync(this SourceRepository repository, NuGetFramework targetFramework)
        {
            var packages = await repository.GetRecentPackagesAsync().ConfigureAwait(false);

            return(await packages.VisualizeUpgradeableDependenciesAsync(repository, targetFramework).ConfigureAwait(false));
        }