本文整理汇总了C#中Queue.StartDownload方法的典型用法代码示例。如果您正苦于以下问题:C# Queue.StartDownload方法的具体用法?C# Queue.StartDownload怎么用?C# Queue.StartDownload使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Queue
的用法示例。
在下文中一共展示了Queue.StartDownload方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: StartDownload
/// <summary>
/// Start downloading a queue entry
/// this will send connection requests to every source of
/// the entry
/// </summary>
/// <param name="me">the queue entry to start downloading to</param>
public void StartDownload(Queue.QueueEntry me)
{
//TODO change this back to thread safe enumerator in the queue class
if (me == null) return;
me.StartDownload();
/* lock (me.SourcesLock)
{//TODO put this in queue class
foreach (Queue.QueueEntry.Source source in me.Sources)
{
if (source.HasHub && source.IsOnline && !CheckForUserInPeers(source.UserName))
{
source.Hub.SendConnectToMe(source.UserName); //signal download to hub to start it
}
}
}
//sources strategy
//for selection and skipping if source offline
//source offline detection
//result.Hub.SendCommand("ConnectToMe", result.UserName); //signal download to hub to start it
//Console.WriteLine("Hub was not resolved from result hub address: " + result.HubAddress);
*/
}
示例2: GetTTHL
/// <summary>
/// TODO Work in progress
/// </summary>
/// <param name="me"></param>
public void GetTTHL(Queue.QueueEntry me)
{
//if (me == null) return;
me.WantTTHL = true;
me.StartDownload();
}