public static TResult RunCheckpoint <TResult>(this ICheckpointRunner runner, string name, Func <IDirectoryLocation, TResult> run, INamingConvention <TResult> namingConvention) { return(runner.RunCheckpoint(name, (dir, mover) => { var result = run(dir); return namingConvention.Move(result, mover.Move); })); }
/// <summary> /// Move the source given the provided move action to generate the result /// </summary> /// <param name="source"></param> /// <param name="move"></param> /// <returns></returns> public Task <TResult> Move(Task <TResult> source, Action <IFileLocation, IFileLocation> move) { return(Task.Run(() => _namingConvention.Move(source.Result, move))); }