Beispiel #1
0
 public ManagedDownloaderTokenImpl(FileDownloaderManager manager, IDownloader downloader)
 {
     _manager = manager;
     if (!manager.Add(downloader))
     {
         throw new InvalidOperationException();
     }
     _id = downloader.Context.Id;
 }
        public static FileDownloaderManager GetFileDownloaderManager(string name = DefaultManagerName)
        {
            if (!Managers.ContainsKey(name))
            {
                Managers[name] = new FileDownloaderManager();
            }

            return(Managers[name]);
        }