private void Add(string install, PackageWorkingInstallFromCache workingInstallFromCache) { this.DependenciesFromCacheToProcess.AddToDictionaryIfNotExist(install, workingInstallFromCache); if (this.IsRoot) { this.AllDependenciesToProcess.AddToDictionaryIfNotExist(install, workingInstallFromCache); } else { OnAddToAllDependencies.Raise(this, new KeyValuePair <string, PackageWorkingInstallFromCache>(install, workingInstallFromCache)); } }
private void HandleEvents(PackageWorkingInstallFromCache workingInstallFromCache) { workingInstallFromCache.OnUpdateCacheStatus += (sender, e) => { internalOnUpdateCacheStatus(sender, e); }; workingInstallFromCache.OnQueueInstallAction += (sender, e) => { if (this.IsRoot) { this.InstallActionsQueue.Enqueue(e.Value); } else { OnQueueInstallAction.Raise(sender, e.Value); } }; workingInstallFromCache.OnAddToAllDependencies += (sender, e) => { var pair = e.Value; if (this.IsRoot) { this.AllDependenciesToProcess.Add(pair.Key, pair.Value); } else { OnAddToAllDependencies.Raise(sender, pair); } }; workingInstallFromCache.OnAddInstallStatus += (sender, e) => { if (this.IsRoot) { this.AddInstallStatus(sender, e.InstallFromCache, e.StatusMode, e.Status, e.Args); } else { this.AddInstallStatus(e.InstallFromCache, e.StatusMode, e.Status, e.Args); } }; }