protected override async Task ProcessCommandInternalAsync( AgentTaskPluginExecutionContext context, Fingerprint fingerprint, Func <Fingerprint[]> restoreKeysGenerator, string path, CancellationToken token) { context.SetTaskVariable(RestoreStepRanVariableName, RestoreStepRanVariableValue); var server = new PipelineCacheServer(); Fingerprint[] restoreFingerprints = restoreKeysGenerator(); await server.DownloadAsync( context, (new [] { fingerprint }).Concat(restoreFingerprints).ToArray(), path, context.GetInput(PipelineCacheTaskPluginConstants.CacheHitVariable, required: false), token); }
protected override async Task ProcessCommandInternalAsync( AgentTaskPluginExecutionContext context, string path, string keyStr, string salt, CancellationToken token) { string[] key = keyStr.Split( new[] { '\n' }, StringSplitOptions.RemoveEmptyEntries ); PipelineCacheServer server = new PipelineCacheServer(); await server.DownloadAsync( context, key, path, salt, context.GetInput(PipelineCacheTaskPluginConstants.CacheHitVariable, required: false), token); }