Click or drag to resize

BackgroundCopyJobAddFiles Method

Adds multiple files to the job.

Namespace:  usis.Net.Bits
Assembly:  usis.Net.Bits (in usis.Net.Bits.dll) Version: 3.0.0.0 (3.0.0.0)
Syntax
public void AddFiles(
	params BackgroundCopyFileInfo[] files
)

Parameters

files
Type: usis.Net.BitsBackgroundCopyFileInfo
The files to add to the job.
Examples
The following sample creates a job and adds three files to it.
C#
using usis.Net.Bits;

namespace BitsTest
{
    internal static class Sample
    {
        internal static void Main()
        {
            using (var manager = BackgroundCopyManager.Connect())
            {
                using (var job = manager.CreateJob("Test", BackgroundCopyJobType.Download))
                {
                    job.AddFiles(
                        new BackgroundCopyFileInfo { RemoteName = "http://localhost/bits1", LocalName = @"C:\tmp\test1.dat" },
                        new BackgroundCopyFileInfo { RemoteName = "http://localhost/bits2", LocalName = @"C:\tmp\test2.dat" },
                        new BackgroundCopyFileInfo { RemoteName = "http://localhost/bits3", LocalName = @"C:\tmp\test3.dat" });
                    job.Resume();
                }
            }
        }
    }
}
See Also