<PackageReference Include="Relativity.Server.Transfer.SDK" Version="24000.0.1" />

AsperaTransferClient

using System; using System.ComponentModel.Composition; using System.Runtime.CompilerServices; using System.Threading; using System.Threading.Tasks; namespace Relativity.Transfer.Aspera { [TransferClientMetadata(Attributes = TransferClientAttributes.HighSpeed, Client = WellKnownTransferClient.Aspera, Company = "kCura Corporation", Copyright = "Copyright © kCura Corp 2017", Description = "Aspera mode is significantly faster than Web mode and ideal for Relativity One usage. To use the Aspera mode, you must:\r\n\r\n - Use a workspace that has been setup with Aspera credentials.\r\n - Accessible TCP and UDP ports (33001-33050).\r\n\r\nIf you meet the above criteria, Relativity will automatically load in Aspera mode. If you are loading in Web mode and think you should have Aspera mode, contact your Relativity Administrator to establish the correct rights.", Id = "812A70A5-7311-46CC-BE53-07BB8C5F9A7D", DisplayName = "Aspera", Name = "Aspera", Version = "1.0")] [Export(typeof(ITransferClient))] internal class AsperaTransferClient : TransferClientBase { internal const string Description = "Aspera mode is significantly faster than Web mode and ideal for Relativity One usage. To use the Aspera mode, you must:\r\n\r\n - Use a workspace that has been setup with Aspera credentials.\r\n - Accessible TCP and UDP ports (33001-33050).\r\n\r\nIf you meet the above criteria, Relativity will automatically load in Aspera mode. If you are loading in Web mode and think you should have Aspera mode, contact your Relativity Administrator to establish the correct rights."; [ImportingConstructor] public AsperaTransferClient([Import("RelativityConnectionInfo")] RelativityConnectionInfo connectionInfo, [Import("Logger")] ITransferLog log, [Import("ClientConfiguration")] ClientConfiguration configuration) : this(connectionInfo, new WorkspaceService(connectionInfo, configuration, log), log, configuration) { } public AsperaTransferClient(RelativityConnectionInfo connectionInfo, IWorkspaceService workspaceService, ITransferLog log, ClientConfiguration configuration) : base(connectionInfo, configuration, workspaceService, log, new Guid("812A70A5-7311-46CC-BE53-07BB8C5F9A7D"), WellKnownTransferClient.Aspera, "Aspera", "Aspera", new AsperaPathValidationFactory(log, configuration)) { } protected override ITransferJobService CreateTransferJobService(ITransferRequest request, ClientConfiguration configuration, CancellationToken token) { if (request == null) throw new ArgumentNullException("request"); if (request.Direction == TransferDirection.Download) return new TransferJobService(request, configuration, new PrimaryKeyGenerator(), new AlternateKeyGenerator(base.FileSystemService), base.Log, token); return base.CreateTransferJobService(request, configuration, token); } [AsyncStateMachine(typeof(<OnSupportCheckAsync>d__4))] protected override Task<ISupportCheckResult> OnSupportCheckAsync(CancellationToken token) { <OnSupportCheckAsync>d__4 stateMachine = default(<OnSupportCheckAsync>d__4); stateMachine.<>t__builder = AsyncTaskMethodBuilder<ISupportCheckResult>.Create(); stateMachine.<>4__this = this; stateMachine.token = token; stateMachine.<>1__state = -1; stateMachine.<>t__builder.Start(ref stateMachine); return stateMachine.<>t__builder.Task; } [AsyncStateMachine(typeof(<OnAutoConfigAsync>d__5))] protected override Task OnAutoConfigAsync(CancellationToken token) { <OnAutoConfigAsync>d__5 stateMachine = default(<OnAutoConfigAsync>d__5); stateMachine.<>t__builder = AsyncTaskMethodBuilder.Create(); stateMachine.<>4__this = this; stateMachine.token = token; stateMachine.<>1__state = -1; stateMachine.<>t__builder.Start(ref stateMachine); return stateMachine.<>t__builder.Task; } [AsyncStateMachine(typeof(<OnCreateJobAsync>d__6))] protected override Task<ITransferJob> OnCreateJobAsync(ITransferRequest request, CancellationToken token) { <OnCreateJobAsync>d__6 stateMachine = default(<OnCreateJobAsync>d__6); stateMachine.<>t__builder = AsyncTaskMethodBuilder<ITransferJob>.Create(); stateMachine.<>4__this = this; stateMachine.request = request; stateMachine.token = token; stateMachine.<>1__state = -1; stateMachine.<>t__builder.Start(ref stateMachine); return stateMachine.<>t__builder.Task; } private AsperaClientConfiguration GetAsperaClientConfiguration() { return (base.Configuration as AsperaClientConfiguration) ?? new AsperaClientConfiguration(base.Configuration); } [AsyncStateMachine(typeof(<OnExecConnectionCheckAsync>d__8))] protected override Task<IConnectionCheckResult> OnExecConnectionCheckAsync(DiagnosticsContext context, CancellationToken token) { <OnExecConnectionCheckAsync>d__8 stateMachine = default(<OnExecConnectionCheckAsync>d__8); stateMachine.<>t__builder = AsyncTaskMethodBuilder<IConnectionCheckResult>.Create(); stateMachine.<>4__this = this; stateMachine.context = context; stateMachine.token = token; stateMachine.<>1__state = -1; stateMachine.<>t__builder.Start(ref stateMachine); return stateMachine.<>t__builder.Task; } [AsyncStateMachine(typeof(<DoesSupportCheckPathExist>d__9))] private Task<Tuple<bool, string>> DoesSupportCheckPathExist(CancellationToken token) { <DoesSupportCheckPathExist>d__9 stateMachine = default(<DoesSupportCheckPathExist>d__9); stateMachine.<>t__builder = AsyncTaskMethodBuilder<Tuple<bool, string>>.Create(); stateMachine.<>4__this = this; stateMachine.token = token; stateMachine.<>1__state = -1; stateMachine.<>t__builder.Start(ref stateMachine); return stateMachine.<>t__builder.Task; } } }