NFly.BitsTransfer 1.0.0-alpha2

This is a prerelease version of NFly.BitsTransfer.
dotnet add package NFly.BitsTransfer --version 1.0.0-alpha2
NuGet\Install-Package NFly.BitsTransfer -Version 1.0.0-alpha2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NFly.BitsTransfer" Version="1.0.0-alpha2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NFly.BitsTransfer --version 1.0.0-alpha2
#r "nuget: NFly.BitsTransfer, 1.0.0-alpha2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install NFly.BitsTransfer as a Cake Addin
#addin nuget:?package=NFly.BitsTransfer&version=1.0.0-alpha2&prerelease

// Install NFly.BitsTransfer as a Cake Tool
#tool nuget:?package=NFly.BitsTransfer&version=1.0.0-alpha2&prerelease

NFly.BitsTransfer

A .Net wrapper library for Windows Background Intelligent Transfer Service (BITS)

DEMO

DEMO

Features

  • Download Single File
  • Download Folder
  • Progress report
  • Estimated downloading time
  • Estimated downloading speed

Usage

var jobName = "YOUR_JOB_NAME"
var job = BitsJob.GetJob(jobName);

//remove existing job
if(job!=null){
  job.Cancel();  
}

//create job
job = BitsJob.Create(jobName);
job.Pause();
job.AddFile("REMOTE_FILE", "PATH_OF_LOCAL_FILE");

//watch progress
job.OnProgress += progress =>{
  var status = job.State;
  if(status == BitsJob.BG_JOB_STATE.BG_JOB_STATE_TRANSFERRED){
    //files transferred, mark job as completed
    job.Complete();

    Console.WriteLine("Job completed, you can access downloaded files now.");
    return;
  }

  Console.WriteLine("----");
  Console.WriteLine("BytesTotal: {0}",progress.BytesTotal);
  Console.WriteLine("BytesTransferred: {0}",progress.BytesTransferred);
  Console.WriteLine("Bytes Per Second: {0}",progress.EstimatedSpeed);
  Console.WriteLine("Remaining Seconds: {0}",progress.EstimatedTimeRemaining);
};

//pause job
job.Pause();

//resume job
job.Resume();
Product Compatible and additional computed target framework versions.
.NET Framework net35 is compatible.  net40 is compatible.  net403 was computed.  net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0-alpha2 796 12/14/2017
1.0.0-alpha1 1,134 3/31/2016

change nuget package structure to meet nuget standard.