private static void List_AddPackage(PackagesList self, string query, IPackage package) { Task t = new Task( //Thread t = new Thread(new ThreadStart( () => { foreach (var dependencySet in package.DependencySets) { foreach (var dependency in dependencySet.Dependencies) { if (!self.Contains(dependency.Id)) { IPackageRepository repo = PackageRepositoryFactory.Default.CreateRepository("https://packages.nuget.org/api/v2"); var dependencyPackage = repo.FindPackagesById(dependency.Id).FirstOrDefault(); if (!self.Contains(dependency.Id)) { self.Add("Dependency of " + package.Id, dependencyPackage); } } } } }); t.Start(); }
public PackagesController(PackagesList list) { this.packagesList = list; }
private void PackagesList_AddPackage(PackagesList self, string query, NuGet.IPackage package) { this.Send("automation", package.Id); }
public ChatHub(PackagesList list) { this.packagesList = list; this.packagesList.AddPackage += PackagesList_AddPackage; }