问题

来源:互联网 发布:蚌埠学院网络教务系统 编辑:程序博客网 时间:2024/05/20 11:20
    void _UpdateFiles()        {            if (_vtUpdateFileInfos.Count == 0)                return;            this.Dispatcher.Invoke(new Action(() =>            {                object olock = new object();                var count=0;                foreach (var item in _vtUpdateFileInfos)                {                                     _app.DownloadFileAsync("DataOutput", "DataOutput", _strServerVersion, item.FolderName + "/" + item.FileName, (nRecv, nPack) =>                    {                        new Task(() =>                        {                            Debug.Set("abc2", 12345);                        }).Start();                                                               },                    (eo, byteFileContext) =>                    {                                          }                    );                }                __UpdateXmlFile();            }            ));                   }


   this.Dispatcher.Invoke(new Action(() =>

此时 内部的Debug.Set 会一直延迟, 直到所有下载结束