public async void QueueUrl(QueueUrl qurl) { Console.WriteLine("[Downloadanager] QueueUrl"); Console.WriteLine("[Downloadanager] QueueUrl Url : {0}", qurl.Url); Console.WriteLine("[Downloadanager] QueueUrl Description : {0}", qurl.Description); string url = qurl.Url; string description = qurl.Description; Download result = null; bool exists = _repo.TryByUrl(url, out result); if (exists) { await _bus.SendAsync <NotifyProgress> (new NotifyProgress { Url = result.Url, Download = result }); await _bus.SendAsync <AlreadyQueued> (new AlreadyQueued { Url = url }); return; } var insert = new Bo.Download { State = Bo.State.Waiting, Url = url, ErrorDescription = description, Written = 0, Total = 0 }; _repo.Insert(insert); await _bus.SendAsync <CheckFreeSlot> (new CheckFreeSlot()); await _bus.SendAsync <NotifyProgress> (new NotifyProgress { Url = insert.Url, Download = insert }); return; }