Orc.NuGetExplorer.PackageManager.SubscribeToDownloadProgress C# (CSharp) Method

SubscribeToDownloadProgress() private method

private SubscribeToDownloadProgress ( IPackageDetails packageDetails ) : void
packageDetails IPackageDetails
return void
        private void SubscribeToDownloadProgress(IPackageDetails packageDetails)
        {
            Argument.IsNotNull(() => packageDetails);

            var packageDownloader = GetPackageDownloaderInstance(packageDetails);
            if (packageDownloader == null)
            {
                return;
            }

            var weakEvent = this.SubscribeToWeakGenericEvent<ProgressEventArgs>(packageDownloader, "ProgressAvailable", OnPackageDownloadProgress);
            if (weakEvent != null)
            {
                _packageEvents.Add(packageDetails, weakEvent);
            }
        }