public void DownloadNodeFile(DownloadNodeFileOptions options)
{
if (options == null)
{
throw new ArgumentNullException("options");
}
NodeFile nodeFile = null;
switch (options.NodeFileType)
{
case PSNodeFileType.Task:
{
JobOperations jobOperations = options.Context.BatchOMClient.JobOperations;
nodeFile = jobOperations.GetNodeFile(options.JobId, options.TaskId, options.NodeFileName, options.AdditionalBehaviors);
break;
}
case PSNodeFileType.ComputeNode:
{
PoolOperations poolOperations = options.Context.BatchOMClient.PoolOperations;
nodeFile = poolOperations.GetNodeFile(options.PoolId, options.ComputeNodeId, options.NodeFileName, options.AdditionalBehaviors);
break;
}
case PSNodeFileType.PSNodeFileInstance:
{
nodeFile = options.NodeFile.omObject;
break;
}
default:
{
throw new ArgumentException(Resources.NoNodeFile);
}
}
DownloadNodeFileByInstance(nodeFile, options.DestinationPath, options.Stream, options.AdditionalBehaviors);
}