Does .NET have a BITS module?

2019-05-11 06:27发布

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.

5条回答
SAY GOODBYE
3楼-- · 2019-05-11 06:53

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

查看更多
放荡不羁爱自由
4楼-- · 2019-05-11 06:55

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.

查看更多
小情绪 Triste *
5楼-- · 2019-05-11 06:56

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).

查看更多
戒情不戒烟
6楼-- · 2019-05-11 06:57

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.

查看更多
登录 后发表回答