/// <summary>
        /// Called when assembly download failed.
        /// </summary>
        private void OnAssemblyDownloadFailed(object sender, FailedDownload failedDownload)
        {
            _failedAssemblies.Add(failedDownload);

            var loader = (IAssemblyFileLoader)sender;

            lock (_assemblyLoaders)
            {
                _assemblyLoaders.Remove(loader);
                loader.Dispose();

                if (_assemblyLoaders.Count == 0 & AssembliesDownloadFailed != null)
                {
                    AssembliesDownloadFailed(this, _failedAssemblies);
                }
            }
        }
 /// <summary>
 /// Called when file download failed.
 /// </summary>
 private void OnFileDownloadFailed(object sender, FailedDownload failedDownload)
 {
     AssemblyDownloadFailed?.Invoke(this, failedDownload);
 }