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();
new AsperaRuntimeExtractor(Paths, log, null).Extract(configuration);
new AsperaConfBuilder(Paths).Build(configuration);
}
global::Aspera.Transfer.Environment.setFaspScpPath(Paths.AsperaEngineFile);
installed = true;
}
}
}