示例#1
0
        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();
        }
示例#2
0
 public PackagesController(PackagesList list)
 {
     this.packagesList = list;
 }
示例#3
0
 private void PackagesList_AddPackage(PackagesList self, string query, NuGet.IPackage package)
 {
     this.Send("automation", package.Id);
 }
示例#4
0
 public ChatHub(PackagesList list)
 {
     this.packagesList = list;
     this.packagesList.AddPackage += PackagesList_AddPackage;
 }