Exemplo n.º 1
0
        private void Install(PackageKeyDiff pck, PackageDependency originalDependency, BuildConfiguration configuration)
        {
            var repository = _cacheRepositories.First(r => r.Type == pck.PackageType);

            using (var s = repository.Download(pck))
                using (var reader = _packageReaderFactory.Get(pck.PackageType, s))
                {
                    BeginInstallPackage?.Invoke(this, new PackageKeyDiffEventArgs(pck, true));
                    reader.InstallTo(_rootDirectory, originalDependency, configuration);
                }

            _index.Install(pck);

            FinishInstallPackage?.Invoke(this, new PackageKeyDiffEventArgs(pck, true));
        }
Exemplo n.º 2
0
 public PackageKeyDiffEventArgs(PackageKeyDiff key, bool succeeded)
 {
     this.PackageKeyDiff = key;
     this.Succeeded      = succeeded;
 }