AsperaRuntime
class AsperaRuntime
using Aspera.Transfer;
using System;
namespace Relativity.Transfer.Aspera
{
internal class AsperaRuntime
{
private readonly AsperaRuntimePaths paths;
private readonly ITransferLog log;
private bool installed;
public AsperaRuntimePaths Paths => paths;
public AsperaRuntime(ITransferLog log)
{
paths = new AsperaRuntimePaths();
if (log == null)
throw new ArgumentNullException("log");
this.log = log;
}
public void Install(AsperaClientConfiguration configuration)
{
if (configuration == null)
throw new ArgumentNullException("configuration");
if (!installed) {
Paths.Create();
AsperaRuntimeExtractor asperaRuntimeExtractor = new AsperaRuntimeExtractor(Paths, log, null);
asperaRuntimeExtractor.Extract(configuration);
AsperaConfBuilder asperaConfBuilder = new AsperaConfBuilder(Paths);
asperaConfBuilder.Build(configuration);
}
global::Aspera.Transfer.Environment.setFaspScpPath(Paths.AsperaEngineFile);
installed = true;
}
}
}