Does .NET have a BITS module?

杀马特。学长 韩版系。学妹 提交于 2019-12-10 09:44:17

问题


I have been researching in to using Background Intelligent Transfer Service. Most articles I have seen says there is no official .NET port but they recommend using sharpBITS. I will use sharpBITS if I have to but I noticed that all of the articles are referencing .NET 1.1 and 2.0, they seem to have been written before 3.0 came out. Was BITS added to 3.0, 3.5, or expected to be in 4.0? I have tried to Google around but BITS is too common of a word in the programming world.


回答1:


No, .NET 3.5 and .NET 4.0 do not expose a managed interface to the Background Intelligent Transfer Service (BITS).

BITS is a very Microsoft-specific technology, and it is highly unlikely they will integrate it into the base class libraries (BCL).

That being said, sharpBITS is probably your best bet, I wouldn't expect it to be in the BCL ever, but I could see it being a separate library that MS exposes under the Microsoft namespace (as they do with products like, Sharepoint and SQL Server Management).




回答2:


I don't think that there will be support for BITS directly in .NET. As .NET Core will be the future place for new features it is unlikely that a Windows only API for BITS will be part of the .NET Framework.

You can find a .NET wrapper for BITS including source code here: https://github.com/usis-software/usis.Net.Bits.

I've implemented this library because is seems taht sharpBITS is no longer maintained and also never made it to GibHub.

There's also a NuGet package available.




回答3:


No, there's no built-in class. There is a wrapper (Sample) that MS published:
http://www.microsoft.com/downloads/details.aspx?FamilyID=93540887-A6D1-405C-8B3C-45DB02E6A8D4&displaylang=en&displaylang=env




回答4:


Not exactly .NET but in newer versions of windows powershell commandlets (*-BitsTransfer) where added that allow you to manipulate BITS transfers.




回答5:


Good news! There's a brand new docs.microsoft.com page that talks about using BITS and C#, plus a brand-new C#/WPF sample on GitHub.

The sample shows how enumerate jobs, resume/pause/cancel, and make new jobs.



来源:https://stackoverflow.com/questions/2299583/does-net-have-a-bits-module

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!