private void ExtractLinks(IDownloadedResource resource)
        {
            foreach (string url in resource.ExtractLinks())
            {
                RemoteResource remoteResource = new RemoteResource(_options, url);

                if (!IsDownloadableResource(remoteResource))
                {
                    continue;
                }

                _uniqueResources.Add(remoteResource);
                _downloadableResources.Add(remoteResource);
            }
        }
        private void ProcessLink(RemoteResource link)
        {
            IDownloadedResource resource = _downloader.Download(link);

            resource.Save();

            _downloadedResources.Add(link);

            ExtractLinks(resource);
            UpdateProgressBar();

            _semaphore.Release();

            if (IsDownloadInProgress())
            {
                return;
            }

            _downloadableResources.CompleteAdding();
        }