diff --git a/Source/Relativity.Transfer.SDK.Samples.CLI/Relativity.Transfer.SDK.Samples.CLI.csproj b/Source/Relativity.Transfer.SDK.Samples.CLI/Relativity.Transfer.SDK.Samples.CLI.csproj
index 1990c8a..9d5100f 100644
--- a/Source/Relativity.Transfer.SDK.Samples.CLI/Relativity.Transfer.SDK.Samples.CLI.csproj
+++ b/Source/Relativity.Transfer.SDK.Samples.CLI/Relativity.Transfer.SDK.Samples.CLI.csproj
@@ -2,19 +2,19 @@
Exe
- net462;net6.0
+ net6.0;net462
10.0
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/Source/Relativity.Transfer.SDK.Samples.Core/Relativity.Transfer.SDK.Samples.Core.csproj b/Source/Relativity.Transfer.SDK.Samples.Core/Relativity.Transfer.SDK.Samples.Core.csproj
index b61788d..f4b6066 100644
--- a/Source/Relativity.Transfer.SDK.Samples.Core/Relativity.Transfer.SDK.Samples.Core.csproj
+++ b/Source/Relativity.Transfer.SDK.Samples.Core/Relativity.Transfer.SDK.Samples.Core.csproj
@@ -8,13 +8,13 @@
-
-
-
-
-
+
+
+
+
+
-
+
diff --git a/Source/Relativity.Transfer.SDK.Samples.Repository/FullPathWorkflow/DownloadDirectory.cs b/Source/Relativity.Transfer.SDK.Samples.Repository/FullPathWorkflow/DownloadDirectory.cs
index 538e009..42f3c80 100644
--- a/Source/Relativity.Transfer.SDK.Samples.Repository/FullPathWorkflow/DownloadDirectory.cs
+++ b/Source/Relativity.Transfer.SDK.Samples.Repository/FullPathWorkflow/DownloadDirectory.cs
@@ -1,5 +1,6 @@
using System.Threading;
using System.Threading.Tasks;
+using Relativity.Transfer.SDK.Interfaces.Options;
using Relativity.Transfer.SDK.Interfaces.Paths;
using Relativity.Transfer.SDK.Samples.Core.Attributes;
using Relativity.Transfer.SDK.Samples.Core.Authentication;
@@ -41,6 +42,13 @@ public async Task ExecuteAsync(Configuration configuration, CancellationToken to
: new DirectoryPath(configuration.DownloadDirectory.Source);
var destination = _pathExtension.EnsureLocalDirectory(configuration.DownloadDirectory.Destination);
var authenticationProvider = _relativityAuthenticationProviderFactory.Create(configuration.Common);
+ // This is transfer options object which is not necessary if you do not need change default parameters.
+ var downloadDirectoryOptions = new DownloadDirectoryOptions()
+ {
+ MaximumSpeed = default,
+ OverwritePolicy = default,
+ // ...
+ };
var progressHandler = _progressHandlerFactory.Create();
// The builder follows the Fluent convention, and more options will be added in the future. The only required component (besides the client name)
@@ -54,7 +62,9 @@ public async Task ExecuteAsync(Configuration configuration, CancellationToken to
_consoleLogger.PrintCreatingTransfer(jobId, source, destination);
var result = await transferClient
- .DownloadDirectoryAsync(jobId, source, destination, progressHandler, token)
+ .DownloadDirectoryAsync(jobId, source, destination, downloadDirectoryOptions, progressHandler, token)
+ // If you do not need pass transfer options you can invoke this method like this:
+ //.DownloadDirectoryAsync(jobId, source, destination, progressHandler, token)
.ConfigureAwait(false);
_consoleLogger.PrintTransferResult(result);
diff --git a/Source/Relativity.Transfer.SDK.Samples.Repository/FullPathWorkflow/DownloadFile.cs b/Source/Relativity.Transfer.SDK.Samples.Repository/FullPathWorkflow/DownloadFile.cs
index b527e72..e7eabf7 100644
--- a/Source/Relativity.Transfer.SDK.Samples.Repository/FullPathWorkflow/DownloadFile.cs
+++ b/Source/Relativity.Transfer.SDK.Samples.Repository/FullPathWorkflow/DownloadFile.cs
@@ -1,5 +1,6 @@
using System.Threading;
using System.Threading.Tasks;
+using Relativity.Transfer.SDK.Interfaces.Options;
using Relativity.Transfer.SDK.Interfaces.Paths;
using Relativity.Transfer.SDK.Samples.Core.Attributes;
using Relativity.Transfer.SDK.Samples.Core.Authentication;
@@ -38,7 +39,14 @@ public async Task ExecuteAsync(Configuration configuration, CancellationToken to
var jobId = configuration.Common.JobId;
var source = new FilePath(configuration.DownloadFile.Source);
var destination = _pathExtension.EnsureLocalDirectory(configuration.DownloadFile.Destination);
- var authenticationProvider = _relativityAuthenticationProviderFactory.Create(configuration.Common);
+ var authenticationProvider = _relativityAuthenticationProviderFactory.Create(configuration.Common);
+ // This is transfer options object which is not necessary if you do not need change default parameters.
+ var downloadFileOptions = new DownloadFileOptions()
+ {
+ MaximumSpeed = default,
+ OverwritePolicy = default,
+ // ...
+ };
var progressHandler = _progressHandlerFactory.Create();
// The builder follows the Fluent convention, and more options will be added in the future. The only required component (besides the client name)
@@ -52,7 +60,9 @@ public async Task ExecuteAsync(Configuration configuration, CancellationToken to
_consoleLogger.PrintCreatingTransfer(jobId, source, destination);
var result = await transferClient
- .DownloadFileAsync(jobId, source, destination, progressHandler, token)
+ .DownloadFileAsync(jobId, source, destination, downloadFileOptions, progressHandler, token)
+ // If you do not need pass transfer options you can invoke this method like this:
+ //.DownloadFileAsync(jobId, source, destination, progressHandler, token)
.ConfigureAwait(false);
_consoleLogger.PrintTransferResult(result);
diff --git a/Source/Relativity.Transfer.SDK.Samples.Repository/FullPathWorkflow/SettingUpProgressHandlerAndPrintingSummary.cs b/Source/Relativity.Transfer.SDK.Samples.Repository/FullPathWorkflow/SettingUpProgressHandlerAndPrintingSummary.cs
index 41d9e3c..4bba66e 100644
--- a/Source/Relativity.Transfer.SDK.Samples.Repository/FullPathWorkflow/SettingUpProgressHandlerAndPrintingSummary.cs
+++ b/Source/Relativity.Transfer.SDK.Samples.Repository/FullPathWorkflow/SettingUpProgressHandlerAndPrintingSummary.cs
@@ -6,6 +6,7 @@
using System.Threading.Tasks;
using ByteSizeLib;
using Relativity.Transfer.SDK.Core.ProgressReporting;
+using Relativity.Transfer.SDK.Interfaces.Options;
using Relativity.Transfer.SDK.Interfaces.Paths;
using Relativity.Transfer.SDK.Interfaces.ProgressReporting;
using Relativity.Transfer.SDK.Samples.Core.Attributes;
@@ -47,7 +48,14 @@ public async Task ExecuteAsync(Configuration configuration, CancellationToken to
: string.Empty;
var destination = string.IsNullOrWhiteSpace(configuration.UploadDirectory.Destination)
? _pathExtension.GetDefaultRemoteDirectoryPathForUpload(configuration.Common)
- : new DirectoryPath(configuration.UploadDirectory.Destination);
+ : new DirectoryPath(configuration.UploadDirectory.Destination);
+ // This is transfer options object which is not necessary if you do not need change default parameters.
+ var uploadDirectoryOptions = new UploadDirectoryOptions()
+ {
+ MaximumSpeed = default,
+ OverwritePolicy = default,
+ // ...
+ };
var authenticationProvider = _relativityAuthenticationProviderFactory.Create(configuration.Common);
// The builder follows the Fluent convention, and more options will be added in the future. The only required component (besides the client name)
@@ -60,8 +68,10 @@ public async Task ExecuteAsync(Configuration configuration, CancellationToken to
_consoleLogger.PrintCreatingTransfer(jobId, source, destination, additionalLine);
- var result = await transferClient
- .UploadDirectoryAsync(jobId, source, destination, GetProgressHandler(), default)
+ var result = await transferClient
+ .UploadDirectoryAsync(jobId, source, destination, uploadDirectoryOptions, GetProgressHandler(), default)
+ // If you do not need pass transfer options you can invoke this method like this:
+ //.UploadDirectoryAsync(jobId, source, destination, GetProgressHandler(), default)
.ConfigureAwait(false);
PrintTransferSummary(result);
diff --git a/Source/Relativity.Transfer.SDK.Samples.Repository/FullPathWorkflow/UploadDirectory.cs b/Source/Relativity.Transfer.SDK.Samples.Repository/FullPathWorkflow/UploadDirectory.cs
index a5db7b1..1154ba6 100644
--- a/Source/Relativity.Transfer.SDK.Samples.Repository/FullPathWorkflow/UploadDirectory.cs
+++ b/Source/Relativity.Transfer.SDK.Samples.Repository/FullPathWorkflow/UploadDirectory.cs
@@ -1,5 +1,6 @@
using System.Threading;
using System.Threading.Tasks;
+using Relativity.Transfer.SDK.Interfaces.Options;
using Relativity.Transfer.SDK.Interfaces.Paths;
using Relativity.Transfer.SDK.Samples.Core.Attributes;
using Relativity.Transfer.SDK.Samples.Core.Authentication;
@@ -40,7 +41,14 @@ public async Task ExecuteAsync(Configuration configuration, CancellationToken to
var destination = string.IsNullOrWhiteSpace(configuration.UploadDirectory.Destination)
? _pathExtension.GetDefaultRemoteDirectoryPathForUpload(configuration.Common)
: new DirectoryPath(configuration.UploadDirectory.Destination);
- var authenticationProvider = _relativityAuthenticationProviderFactory.Create(configuration.Common);
+ var authenticationProvider = _relativityAuthenticationProviderFactory.Create(configuration.Common);
+ // This is transfer options object which is not necessary if you do not need change default parameters.
+ var uploadDirectoryOptions = new UploadDirectoryOptions()
+ {
+ MaximumSpeed = default,
+ OverwritePolicy = default,
+ // ...
+ };
var progressHandler = _progressHandlerFactory.Create();
// The builder follows the Fluent convention, and more options will be added in the future. The only required component (besides the client name)
@@ -54,7 +62,9 @@ public async Task ExecuteAsync(Configuration configuration, CancellationToken to
_consoleLogger.PrintCreatingTransfer(jobId, source, destination);
var result = await transferClient
- .UploadDirectoryAsync(jobId, source, destination, progressHandler, token)
+ .UploadDirectoryAsync(jobId, source, destination, uploadDirectoryOptions, progressHandler, token)
+ // If you do not need pass transfer options you can invoke this method like this:
+ //.UploadDirectoryAsync(jobId, source, destination, progressHandler, token)
.ConfigureAwait(false);
_consoleLogger.PrintTransferResult(result);
diff --git a/Source/Relativity.Transfer.SDK.Samples.Repository/FullPathWorkflow/UploadDirectoryWithCustomizedRetryPolicy.cs b/Source/Relativity.Transfer.SDK.Samples.Repository/FullPathWorkflow/UploadDirectoryWithCustomizedRetryPolicy.cs
index 45e5eda..c97e4ef 100644
--- a/Source/Relativity.Transfer.SDK.Samples.Repository/FullPathWorkflow/UploadDirectoryWithCustomizedRetryPolicy.cs
+++ b/Source/Relativity.Transfer.SDK.Samples.Repository/FullPathWorkflow/UploadDirectoryWithCustomizedRetryPolicy.cs
@@ -64,7 +64,9 @@ public async Task ExecuteAsync(Configuration configuration, CancellationToken to
};
var result = await transferClient
- .UploadDirectoryAsync(jobId, source, destination, exponentialRetryPolicyOptions, progressHandler, token)
+ .UploadDirectoryAsync(jobId, source, destination, exponentialRetryPolicyOptions, progressHandler, token)
+ // If you do not need pass transfer options you can invoke this method like this:
+ //.UploadDirectoryAsync(jobId, source, destination, progressHandler, token)
.ConfigureAwait(false);
_consoleLogger.PrintTransferResult(result);
diff --git a/Source/Relativity.Transfer.SDK.Samples.Repository/FullPathWorkflow/UploadDirectoryWithExclusionPolicy.cs b/Source/Relativity.Transfer.SDK.Samples.Repository/FullPathWorkflow/UploadDirectoryWithExclusionPolicy.cs
index c41823e..97775cb 100644
--- a/Source/Relativity.Transfer.SDK.Samples.Repository/FullPathWorkflow/UploadDirectoryWithExclusionPolicy.cs
+++ b/Source/Relativity.Transfer.SDK.Samples.Repository/FullPathWorkflow/UploadDirectoryWithExclusionPolicy.cs
@@ -70,7 +70,9 @@ public async Task ExecuteAsync(Configuration configuration, CancellationToken to
_consoleLogger.PrintCreatingTransfer(jobId, source, destination);
var result = await transferClient
- .UploadDirectoryAsync(jobId, source, destination, fileExclusionPolicyOptions, progressHandler, token)
+ .UploadDirectoryAsync(jobId, source, destination, fileExclusionPolicyOptions, progressHandler, token)
+ // If you do not need pass transfer options you can invoke this method like this:
+ //.UploadDirectoryAsync(jobId, source, destination, progressHandler, token)
.ConfigureAwait(false);
_consoleLogger.PrintTransferResult(result);
diff --git a/Source/Relativity.Transfer.SDK.Samples.Repository/FullPathWorkflow/UploadFile.cs b/Source/Relativity.Transfer.SDK.Samples.Repository/FullPathWorkflow/UploadFile.cs
index 2d9614d..8312350 100644
--- a/Source/Relativity.Transfer.SDK.Samples.Repository/FullPathWorkflow/UploadFile.cs
+++ b/Source/Relativity.Transfer.SDK.Samples.Repository/FullPathWorkflow/UploadFile.cs
@@ -1,5 +1,6 @@
using System.Threading;
using System.Threading.Tasks;
+using Relativity.Transfer.SDK.Interfaces.Options;
using Relativity.Transfer.SDK.Interfaces.Paths;
using Relativity.Transfer.SDK.Samples.Core.Attributes;
using Relativity.Transfer.SDK.Samples.Core.Authentication;
@@ -40,7 +41,14 @@ public async Task ExecuteAsync(Configuration configuration, CancellationToken to
var destination = string.IsNullOrWhiteSpace(configuration.UploadFile.Destination)
? _pathExtension.GetDefaultRemoteDirectoryPathForUpload(configuration.Common)
: new DirectoryPath(configuration.UploadFile.Destination);
- var authenticationProvider = _relativityAuthenticationProviderFactory.Create(configuration.Common);
+ var authenticationProvider = _relativityAuthenticationProviderFactory.Create(configuration.Common);
+ // This is transfer options object which is not necessary if you do not need change default parameters.
+ var uploadFileOptions = new UploadFileOptions()
+ {
+ MaximumSpeed = default,
+ OverwritePolicy = default,
+ // ...
+ };
var progressHandler = _progressHandlerFactory.Create();
// The builder follows the Fluent convention, and more options will be added in the future. The only required component (besides the client name)
@@ -54,7 +62,9 @@ public async Task ExecuteAsync(Configuration configuration, CancellationToken to
_consoleLogger.PrintCreatingTransfer(jobId, source, destination);
var result = await transferClient
- .UploadFileAsync(jobId, source, destination, progressHandler, token)
+ .UploadFileAsync(jobId, source, destination, uploadFileOptions, progressHandler, token)
+ // If you do not need pass transfer options you can invoke this method like this:
+ //.UploadFileAsync(jobId, source, destination, progressHandler, token)
.ConfigureAwait(false);
_consoleLogger.PrintTransferResult(result);
diff --git a/Source/Relativity.Transfer.SDK.Samples.Repository/FullPathWorkflow/UploadItems.cs b/Source/Relativity.Transfer.SDK.Samples.Repository/FullPathWorkflow/UploadItems.cs
index 8dc8972..2e2941b 100644
--- a/Source/Relativity.Transfer.SDK.Samples.Repository/FullPathWorkflow/UploadItems.cs
+++ b/Source/Relativity.Transfer.SDK.Samples.Repository/FullPathWorkflow/UploadItems.cs
@@ -3,6 +3,7 @@
using System.IO;
using System.Threading;
using System.Threading.Tasks;
+using Relativity.Transfer.SDK.Interfaces.Options;
using Relativity.Transfer.SDK.Interfaces.Paths;
using Relativity.Transfer.SDK.Samples.Core.Attributes;
using Relativity.Transfer.SDK.Samples.Core.Authentication;
@@ -41,7 +42,14 @@ public async Task ExecuteAsync(Configuration configuration, CancellationToken to
var destination = string.IsNullOrWhiteSpace(configuration.UploadFile.Destination)
? _pathExtension.GetDefaultRemoteDirectoryPathForUpload(configuration.Common)
: new DirectoryPath(configuration.UploadFile.Destination);
- var authenticationProvider = _relativityAuthenticationProviderFactory.Create(configuration.Common);
+ var authenticationProvider = _relativityAuthenticationProviderFactory.Create(configuration.Common);
+ // This is transfer options object which is not necessary if you do not need change default parameters.
+ var uploadListOfItemsOptions = new UploadListOfItemsOptions()
+ {
+ MaximumSpeed = default,
+ OverwritePolicy = default,
+ // ...
+ };
var progressHandler = _progressHandlerFactory.Create();
// The builder follows the Fluent convention, and more options will be added in the future. The only required component (besides the client name)
@@ -58,7 +66,9 @@ public async Task ExecuteAsync(Configuration configuration, CancellationToken to
{
var sources = GetTransferredEntities(configuration.UploadFile.Source);
var result = await transferClient
- .UploadItemsAsync(jobId, sources, destination, progressHandler, token)
+ .UploadItemsAsync(jobId, sources, destination, uploadListOfItemsOptions, progressHandler, token)
+ // If you do not need pass transfer options you can invoke this method like this:
+ //.UploadItemsAsync(jobId, sources, destination, progressHandler, token)
.ConfigureAwait(false);
_consoleLogger.PrintTransferResult(result);
diff --git a/Source/Relativity.Transfer.SDK.Samples.Repository/FullPathWorkflow/UploadToFileSharePathBasedOnWorkspaceId.cs b/Source/Relativity.Transfer.SDK.Samples.Repository/FullPathWorkflow/UploadToFileSharePathBasedOnWorkspaceId.cs
index 90ff20d..29d5459 100644
--- a/Source/Relativity.Transfer.SDK.Samples.Repository/FullPathWorkflow/UploadToFileSharePathBasedOnWorkspaceId.cs
+++ b/Source/Relativity.Transfer.SDK.Samples.Repository/FullPathWorkflow/UploadToFileSharePathBasedOnWorkspaceId.cs
@@ -7,6 +7,7 @@
using System.Threading;
using System.Threading.Tasks;
using Newtonsoft.Json;
+using Relativity.Transfer.SDK.Interfaces.Options;
using Relativity.Transfer.SDK.Interfaces.Paths;
using Relativity.Transfer.SDK.Samples.Core.Attributes;
using Relativity.Transfer.SDK.Samples.Core.Authentication;
@@ -53,6 +54,13 @@ public async Task ExecuteAsync(Configuration configuration, CancellationToken to
var jobId = configuration.Common.JobId;
var source = new DirectoryPath(configuration.UploadDirectoryByWorkspaceId.Source);
var authenticationProvider = _relativityAuthenticationProviderFactory.Create(configuration.Common);
+ // This is transfer options object which is not necessary if you do not need change default parameters.
+ var uploadDirectoryOptions = new UploadDirectoryOptions()
+ {
+ MaximumSpeed = default,
+ OverwritePolicy = default,
+ // ...
+ };
var progressHandler = _progressHandlerFactory.Create();
// Get list of file shares by workspace ID. The association is based on Resource Pool assigned to the workspace.
@@ -76,7 +84,9 @@ public async Task ExecuteAsync(Configuration configuration, CancellationToken to
_consoleLogger.PrintCreatingTransfer(jobId, source, destination);
var result = await transferClient
- .UploadDirectoryAsync(jobId, source, destination, progressHandler, token)
+ .UploadDirectoryAsync(jobId, source, destination, uploadDirectoryOptions, progressHandler, token)
+ // If you do not need pass transfer options you can invoke this method like this:
+ //.UploadDirectoryAsync(jobId, source, destination, progressHandler, token)
.ConfigureAwait(false);
_consoleLogger.PrintTransferResult(result);
diff --git a/Source/Relativity.Transfer.SDK.Samples.Repository/JobBasedWorkflow/DownloadDirectory.cs b/Source/Relativity.Transfer.SDK.Samples.Repository/JobBasedWorkflow/DownloadDirectory.cs
index 04308cf..85bbf63 100644
--- a/Source/Relativity.Transfer.SDK.Samples.Repository/JobBasedWorkflow/DownloadDirectory.cs
+++ b/Source/Relativity.Transfer.SDK.Samples.Repository/JobBasedWorkflow/DownloadDirectory.cs
@@ -2,6 +2,7 @@
using System.Threading;
using System.Threading.Tasks;
using Relativity.Transfer.SDK.Interfaces.Authentication;
+using Relativity.Transfer.SDK.Interfaces.Options;
using Relativity.Transfer.SDK.Interfaces.Paths;
using Relativity.Transfer.SDK.Samples.Core.Attributes;
using Relativity.Transfer.SDK.Samples.Core.Authentication;
@@ -42,8 +43,15 @@ public async Task ExecuteAsync(Configuration configuration, CancellationToken to
? _pathExtension.GetDefaultRemoteDirectoryPathForDownload(configuration.Common)
: new DirectoryPath(configuration.DownloadDirectory.Source);
var destination = _pathExtension.EnsureLocalDirectory(configuration.DownloadDirectory.Destination);
- var authenticationProvider = _relativityAuthenticationProviderFactory.Create(configuration.Common);
- var progressHandler = _progressHandlerFactory.Create();
+ var authenticationProvider = _relativityAuthenticationProviderFactory.Create(configuration.Common);
+ // This is transfer options object which is not necessary if you do not need change default parameters.
+ var downloadDirectoryOptions = new DownloadDirectoryOptions()
+ {
+ MaximumSpeed = default,
+ OverwritePolicy = default,
+ // ...
+ };
+ var progressHandler = _progressHandlerFactory.Create();
await RegisterDownloadJobAsync(authenticationProvider, jobId, source).ConfigureAwait(false);
@@ -59,8 +67,10 @@ public async Task ExecuteAsync(Configuration configuration, CancellationToken to
_consoleLogger.PrintCreatingTransfer(jobId, source, destination);
var result = await transferClient
- .DownloadDirectoryAsync(jobId, destination, progressHandler, token)
- .ConfigureAwait(false);
+ .DownloadDirectoryAsync(jobId, destination, downloadDirectoryOptions, progressHandler, token)
+ // If you do not need pass transfer options you can invoke this method like this:
+ //.DownloadDirectoryAsync(jobId, destination, progressHandler, token)
+ .ConfigureAwait(false);
_consoleLogger.PrintTransferResult(result);
}
diff --git a/Source/Relativity.Transfer.SDK.Samples.Repository/JobBasedWorkflow/DownloadDirectoryBasedOnExistingJob.cs b/Source/Relativity.Transfer.SDK.Samples.Repository/JobBasedWorkflow/DownloadDirectoryBasedOnExistingJob.cs
index 7532bc6..3c391ca 100644
--- a/Source/Relativity.Transfer.SDK.Samples.Repository/JobBasedWorkflow/DownloadDirectoryBasedOnExistingJob.cs
+++ b/Source/Relativity.Transfer.SDK.Samples.Repository/JobBasedWorkflow/DownloadDirectoryBasedOnExistingJob.cs
@@ -2,6 +2,7 @@
using System.Threading;
using System.Threading.Tasks;
using Relativity.Transfer.SDK.Interfaces.Authentication;
+using Relativity.Transfer.SDK.Interfaces.Options;
using Relativity.Transfer.SDK.Interfaces.Paths;
using Relativity.Transfer.SDK.Samples.Core.Attributes;
using Relativity.Transfer.SDK.Samples.Core.Authentication;
@@ -43,8 +44,15 @@ public async Task ExecuteAsync(Configuration configuration, CancellationToken to
string.IsNullOrWhiteSpace(configuration.DownloadDirectoryBasedOnExistingJob.FirstDestination)
? _pathExtension.GetDefaultRemoteDirectoryPathForUpload(configuration.Common)
: new DirectoryPath(configuration.DownloadDirectoryBasedOnExistingJob.FirstDestination);
- var authenticationProvider = _relativityAuthenticationProviderFactory.Create(configuration.Common);
- var progressHandler = _progressHandlerFactory.Create();
+ var authenticationProvider = _relativityAuthenticationProviderFactory.Create(configuration.Common);
+ // This is transfer options object which is not necessary if you do not need change default parameters.
+ var uploadDirectoryOptions = new UploadDirectoryOptions()
+ {
+ MaximumSpeed = default,
+ OverwritePolicy = default,
+ // ...
+ };
+ var progressHandler = _progressHandlerFactory.Create();
// The builder follows the Fluent convention, and more options will be added in the future. The only required component (besides the client name)
// is the authentication provider - a provided one that utilizes an OAuth-based approach has been provided, but the custom implementation can be created.
@@ -58,8 +66,10 @@ public async Task ExecuteAsync(Configuration configuration, CancellationToken to
_consoleLogger.PrintCreatingTransfer(uploadJobId, uploadSource, uploadDestination);
var uploadResult = await transferFullPathClient
- .UploadDirectoryAsync(uploadJobId, uploadSource, uploadDestination, progressHandler, token)
- .ConfigureAwait(false);
+ .UploadDirectoryAsync(uploadJobId, uploadSource, uploadDestination, uploadDirectoryOptions, progressHandler, token)
+ // If you do not need pass transfer options you can invoke this method like this:
+ //.UploadDirectoryAsync(uploadJobId, uploadSource, uploadDestination, progressHandler, token)
+ .ConfigureAwait(false);
_consoleLogger.PrintTransferResult(uploadResult, "Upload transfer has finished:", false);
@@ -78,11 +88,20 @@ await RegisterDownloadJobFromExistingJobAsync(authenticationProvider, downloadJo
.WithStagingExplorerContext()
.Build();
- _consoleLogger.PrintCreatingTransfer(downloadJobId, uploadSource, downloadDestination);
-
- var downloadResult = await transferJobClient
- .DownloadDirectoryAsync(downloadJobId, downloadDestination, progressHandler, token)
- .ConfigureAwait(false);
+ _consoleLogger.PrintCreatingTransfer(downloadJobId, uploadSource, downloadDestination);
+ // This is transfer options object which is not necessary if you do not need change default parameters.
+ var downloadDirectoryOptions = new DownloadDirectoryOptions()
+ {
+ MaximumSpeed = default,
+ OverwritePolicy = default,
+ // ...
+ };
+
+ var downloadResult = await transferJobClient
+ .DownloadDirectoryAsync(downloadJobId, downloadDestination, downloadDirectoryOptions, progressHandler, token)
+ // If you do not need pass transfer options you can invoke this method like this:
+ //.DownloadDirectoryAsync(downloadJobId, downloadDestination, progressHandler, token)
+ .ConfigureAwait(false);
_consoleLogger.PrintTransferResult(downloadResult, "Download transfer has finished:");
}
diff --git a/Source/Relativity.Transfer.SDK.Samples.Repository/JobBasedWorkflow/UploadDirectory.cs b/Source/Relativity.Transfer.SDK.Samples.Repository/JobBasedWorkflow/UploadDirectory.cs
index 423d977..0d6d555 100644
--- a/Source/Relativity.Transfer.SDK.Samples.Repository/JobBasedWorkflow/UploadDirectory.cs
+++ b/Source/Relativity.Transfer.SDK.Samples.Repository/JobBasedWorkflow/UploadDirectory.cs
@@ -2,6 +2,7 @@
using System.Threading;
using System.Threading.Tasks;
using Relativity.Transfer.SDK.Interfaces.Authentication;
+using Relativity.Transfer.SDK.Interfaces.Options;
using Relativity.Transfer.SDK.Interfaces.Paths;
using Relativity.Transfer.SDK.Samples.Core.Attributes;
using Relativity.Transfer.SDK.Samples.Core.Authentication;
@@ -42,8 +43,15 @@ public async Task ExecuteAsync(Configuration configuration, CancellationToken to
var destination = string.IsNullOrWhiteSpace(configuration.UploadDirectory.Destination)
? _pathExtension.GetDefaultRemoteDirectoryPathForUpload(configuration.Common)
: new DirectoryPath(configuration.UploadDirectory.Destination);
- var authenticationProvider = _relativityAuthenticationProviderFactory.Create(configuration.Common);
- var progressHandler = _progressHandlerFactory.Create();
+ var authenticationProvider = _relativityAuthenticationProviderFactory.Create(configuration.Common);
+ // This is transfer options object which is not necessary if you do not need change default parameters.
+ var uploadDirectoryOptions = new UploadDirectoryOptions()
+ {
+ MaximumSpeed = default,
+ OverwritePolicy = default,
+ // ...
+ };
+ var progressHandler = _progressHandlerFactory.Create();
await RegisterUploadDirectoryJobAsync(authenticationProvider, jobId, destination).ConfigureAwait(false);
@@ -59,8 +67,10 @@ public async Task ExecuteAsync(Configuration configuration, CancellationToken to
_consoleLogger.PrintCreatingTransfer(jobId, source, destination);
var result = await transferClient
- .UploadDirectoryAsync(jobId, source, progressHandler, token)
- .ConfigureAwait(false);
+ .UploadDirectoryAsync(jobId, source, uploadDirectoryOptions, progressHandler, token)
+ // If you do not need pass transfer options you can invoke this method like this:
+ //.UploadDirectoryAsync(jobId, source, progressHandler, token)
+ .ConfigureAwait(false);
_consoleLogger.PrintTransferResult(result);
}
diff --git a/Source/Relativity.Transfer.SDK.Samples.Repository/JobBasedWorkflow/UploadDirectoryBasedOnExistingJob.cs b/Source/Relativity.Transfer.SDK.Samples.Repository/JobBasedWorkflow/UploadDirectoryBasedOnExistingJob.cs
index 8743a24..fde5d64 100644
--- a/Source/Relativity.Transfer.SDK.Samples.Repository/JobBasedWorkflow/UploadDirectoryBasedOnExistingJob.cs
+++ b/Source/Relativity.Transfer.SDK.Samples.Repository/JobBasedWorkflow/UploadDirectoryBasedOnExistingJob.cs
@@ -1,6 +1,7 @@
using System;
using System.Threading;
using System.Threading.Tasks;
+using Relativity.Transfer.SDK.Interfaces.Options;
using Relativity.Transfer.SDK.Interfaces.Paths;
using Relativity.Transfer.SDK.Samples.Core.Attributes;
using Relativity.Transfer.SDK.Samples.Core.Authentication;
@@ -46,8 +47,15 @@ public async Task ExecuteAsync(Configuration configuration, CancellationToken to
// To enhance the visual representation of the newly transferred data alongside the previously transferred data by the preceding job, it is advisable to utilize a unique source data set.
var secondSource = new DirectoryPath(configuration.UploadDirectoryBasedOnExistingJob.SecondSource);
var authenticationProvider = _relativityAuthenticationProviderFactory.Create(configuration.Common);
- var jobBuilder = new TransferJobBuilder(authenticationProvider);
- var progressHandler = _progressHandlerFactory.Create();
+ var jobBuilder = new TransferJobBuilder(authenticationProvider);
+ // This is transfer options object which is not necessary if you do not need change default parameters.
+ var firstUploadDirectoryOptions = new UploadDirectoryOptions()
+ {
+ MaximumSpeed = default,
+ OverwritePolicy = default,
+ // ...
+ };
+ var progressHandler = _progressHandlerFactory.Create();
await RegisterUploadDirectoryJobAsync(jobBuilder, firstJobId, destination).ConfigureAwait(false);
@@ -63,16 +71,28 @@ public async Task ExecuteAsync(Configuration configuration, CancellationToken to
_consoleLogger.PrintCreatingTransfer(firstJobId, firstSource, destination);
var firstResult = await transferClient
- .UploadDirectoryAsync(firstJobId, firstSource, progressHandler, token)
- .ConfigureAwait(false);
+ .UploadDirectoryAsync(firstJobId, firstSource, firstUploadDirectoryOptions, progressHandler, token)
+ // If you do not need pass transfer options you can invoke this method like this:
+ //.UploadDirectoryAsync(firstJobId, firstSource, progressHandler, token)
+ .ConfigureAwait(false);
_consoleLogger.PrintTransferResult(firstResult, "First transfer has finished:", false);
- await RegisterUploadJobFromExistingJobAsync(jobBuilder, secondJobId, firstJobId).ConfigureAwait(false);
-
+ await RegisterUploadJobFromExistingJobAsync(jobBuilder, secondJobId, firstJobId).ConfigureAwait(false);
+
+ // This is transfer options object which is not necessary if you do not need change default parameters.
+ var secondUploadDirectoryOptions = new UploadDirectoryOptions()
+ {
+ MaximumSpeed = default,
+ OverwritePolicy = default,
+ // ...
+ };
+
var secondResult = await transferClient
- .UploadDirectoryAsync(secondJobId, secondSource, progressHandler, token)
- .ConfigureAwait(false);
+ .UploadDirectoryAsync(secondJobId, secondSource, secondUploadDirectoryOptions, progressHandler, token)
+ // If you do not need pass transfer options you can invoke this method like this:
+ //.UploadDirectoryAsync(secondJobId, secondSource, progressHandler, token)
+ .ConfigureAwait(false);
_consoleLogger.PrintTransferResult(secondResult, "Second transfer has finished:");
}
diff --git a/Source/Relativity.Transfer.SDK.Samples.Repository/JobBasedWorkflow/UploadItems.cs b/Source/Relativity.Transfer.SDK.Samples.Repository/JobBasedWorkflow/UploadItems.cs
index df2f5e3..6bf46f4 100644
--- a/Source/Relativity.Transfer.SDK.Samples.Repository/JobBasedWorkflow/UploadItems.cs
+++ b/Source/Relativity.Transfer.SDK.Samples.Repository/JobBasedWorkflow/UploadItems.cs
@@ -4,6 +4,7 @@
using System.Threading;
using System.Threading.Tasks;
using Relativity.Transfer.SDK.Interfaces.Authentication;
+using Relativity.Transfer.SDK.Interfaces.Options;
using Relativity.Transfer.SDK.Interfaces.Paths;
using Relativity.Transfer.SDK.Samples.Core.Attributes;
using Relativity.Transfer.SDK.Samples.Core.Authentication;
@@ -42,7 +43,14 @@ public async Task ExecuteAsync(Configuration configuration, CancellationToken to
var destination = string.IsNullOrWhiteSpace(configuration.UploadFile.Destination)
? _pathExtension.GetDefaultRemoteDirectoryPathForUpload(configuration.Common)
: new DirectoryPath(configuration.UploadFile.Destination);
- var authenticationProvider = _relativityAuthenticationProviderFactory.Create(configuration.Common);
+ var authenticationProvider = _relativityAuthenticationProviderFactory.Create(configuration.Common);
+ // This is transfer options object which is not necessary if you do not need change default parameters.
+ var uploadListOfItemsOptions = new UploadListOfItemsOptions()
+ {
+ MaximumSpeed = default,
+ OverwritePolicy = default,
+ // ...
+ };
var progressHandler = _progressHandlerFactory.Create();
await RegisterUploadDirectoryJobAsync(authenticationProvider, jobId, destination).ConfigureAwait(false);
@@ -62,7 +70,9 @@ public async Task ExecuteAsync(Configuration configuration, CancellationToken to
{
var sources = GetTransferredEntities(configuration.UploadFile.Source);
var result = await transferClient
- .UploadItemsAsync(jobId, sources, progressHandler, token)
+ .UploadItemsAsync(jobId, sources, uploadListOfItemsOptions, progressHandler, token)
+ // If you do not need pass transfer options you can invoke this method like this:
+ //.UploadItemsAsync(jobId, sources, progressHandler, token)
.ConfigureAwait(false);
_consoleLogger.PrintTransferResult(result);