public CliRunCmd apply(CompressionToolProperties properties, IEnumerable <string> cutProps) { Templates templates = new Templates(executable, parameter); cutProps.Where(c => !properties.Contains(c)).ToList().ForEach(templates.Cutout); cutProps.Where(c => properties.Contains(c)).ToList().ForEach(templates.Cut); return(new CliRunCmd(executable: templates.executable.Replace(properties), parameters: templates.parameter.Replace(properties))); }
public void execute(IEnumerable <CliTemplate> cliTemplates, IEnumerable <string> cutProps, CompressionToolProperties properties) { cliTemplates.Select(cli => cli.apply(properties, cutProps)).ToList().ForEach(r => processOperator.Run(r)); }