private IEnumerable GetInputFor(Projection projection) { var sourceProjection = _projections.FirstOrDefault(x => x.OutputType == projection.InputType); if (sourceProjection == null) return _documentStore.All(projection.InputType); var path = GetPathFor(sourceProjection); return (IEnumerable)Disk.Read(path, typeof(IEnumerable<>).MakeGenericType(projection.InputType)); }
private string GetPathFor(Projection projection) { return Path.Combine(_parentDirectory, "indexes", projection.GetType().FullName + ".json"); }