Represents the transfer queue.

      Syntax

      public class TransferQueue : Transferrer, ITraceSource

      Examples

      FTP Examples

      Shows how to use the TransferQueue class to add files/directories to the transfer list and start the queue.

      using ComponentPro.IO;
      using ComponentPro.Net;
      
      ...
      
      // Create a new instance of the Ftp class. 
      using (Ftp client = new Ftp())
      {
          // Connect to the server. 
          client.Connect(serverName);
      
          // Authenticate the user 
          client.Authenticate(userName, password);
      
          // Initialize a queue with 5 threads. 
          TransferQueue queue = new TransferQueue(5);
          // Add items to the queue 
          queue.Add(DiskFileSystem.Default.CreateFileInfo(@"C:\data\folder1"), client.CreateFileInfo("/data/folder1"), false, null, 0);
          queue.Add(DiskFileSystem.Default.CreateFileInfo(@"C:\data\folder2"), client.CreateFileInfo("/data/folder2"), false, null, 0);
          queue.Add(DiskFileSystem.Default.CreateFileInfo(@"C:\data\file1"), client.CreateFileInfo("/data/file1"), false, null, 0);
      
          // Start the queue. 
          // It immediately returns control to the caller's process. 
          queue.Start(false);
      
          // ... 
          // Here we can add more items to the queue while it's in progress 
          queue.Add(DiskFileSystem.Default.CreateFileInfo(@"C:\data\folder3"), client.CreateFileInfo("/data/folder3"), false, null, 0);
      
          // ... 
       
          // or we can change the number of threads. 
          // e.g. use 5 more threads -> 10 threads. 
          queue.Threads = 10;
      
          // ... 
       
          // the queue can be paused. 
          queue.Stop();
      
          // ... 
          // and then resumed 
          queue.Start(true);
      
          // ... 
          // we can also wait until it completes. 
          queue.Wait(true);
      }

      SFTP Examples

      Shows how to use the TransferQueue class to add files/directories to the transfer list and start the queue.

      using ComponentPro.IO;
      using ComponentPro.Net;
      
      ...
      
      // Create a new instance of the Sftp class. 
      using (Sftp client = new Sftp())
      {
          // Connect to the server. 
          client.Connect(serverName);
      
          // Authenticate the user 
          client.Authenticate(userName, password);
      
          // Initialize a queue with 5 threads. 
          TransferQueue queue = new TransferQueue(5);
          // Add items to the queue 
          queue.Add(DiskFileSystem.Default.CreateFileInfo(@"C:\data\folder1"), client.CreateFileInfo("/data/folder1"), false, null, 0);
          queue.Add(DiskFileSystem.Default.CreateFileInfo(@"C:\data\folder2"), client.CreateFileInfo("/data/folder2"), false, null, 0);
          queue.Add(DiskFileSystem.Default.CreateFileInfo(@"C:\data\file1"), client.CreateFileInfo("/data/file1"), false, null, 0);
      
          // Start the queue. 
          // It immediately returns control to the caller's process. 
          queue.Start(false);
      
          // ... 
          // Here we can add more items to the queue while it's in progress 
          queue.Add(DiskFileSystem.Default.CreateFileInfo(@"C:\data\folder3"), client.CreateFileInfo("/data/folder3"), false, null, 0);
      
          // ... 
       
          // or we can change the number of threads. 
          // e.g. use 5 more threads -> 10 threads. 
          queue.Threads = 10;
      
          // ... 
       
          // the queue can be paused. 
          queue.Stop();
      
          // ... 
          // and then resumed 
          queue.Start(true);
      
          // ... 
          // we can also wait until it completes. 
          queue.Wait(true);
      }

      Inheritance Hierarchy

            ComponentPro.IO.ComponentPro.IO.TransferQueue

      Framework

      .NET Compact Framework.NET Compact Framework

      Supported version: 2.0, 3.5, and 3.9
      Assembly: ComponentPro.FileSystem.CF (in ComponentPro.FileSystem.CF.dll)

      .NET Framework.NET Framework

      Supported version: 2.0, 3.0, 3.5, 4.0, 4.5.x, 4.6.x and later
      Assembly: ComponentPro.FileSystem (in ComponentPro.FileSystem.dll)

      Portable Class Library for Windows Phone 8.1 and Windows 8.1 Store AppsPortable Class Library for Windows Phone 8.1 and Windows 8.1 Store Apps

      Supported version: 4.6.x and later
      Assembly: ComponentPro.FileSystem.WinPcl (in ComponentPro.FileSystem.WinPcl.dll)

      Universal Windows Platform (includes Windows 10 Mobile, Windows 10 Store Apps and Windows 10 IoT)Universal Windows Platform (includes Windows 10 Mobile, Windows 10 Store Apps and Windows 10 IoT)

      Supported version: 4.6.x and later
      Assembly: ComponentPro.FileSystem.Uwp (in ComponentPro.FileSystem.Uwp.dll)

      Xamarin AndroidXamarin Android

      Supported version: 2.3 and later
      Assembly: ComponentPro.FileSystem.Android (in ComponentPro.FileSystem.Android.dll)

      Xamarin MacXamarin Mac

      Supported version: 2.0.x and later
      Assembly: ComponentPro.FileSystem.Mac (in ComponentPro.FileSystem.Mac.dll)

      Xamarin iOSXamarin iOS

      Supported version: 5.1.x and later
      Assembly: ComponentPro.FileSystem.iOS (in ComponentPro.FileSystem.iOS.dll)

      See Also