private static PipeDataProcessor AddResolution(string dataDirectory, TickType tickType, PipeDataProcessor root, Resolution resolution, bool sourceIsTick) { var second = new CsvDataProcessor(dataDirectory, resolution, tickType); var secondRoot = new PipeDataProcessor(second); var aggregator = new ConsolidatorDataProcessor(secondRoot, data => CreateConsolidator(resolution, tickType, data, sourceIsTick)); root.PipeTo(aggregator); return secondRoot; }