Пример #1
0
 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));
 }
Пример #2
0
 private string GetPathFor(Projection projection)
 {
     return Path.Combine(_parentDirectory, "indexes", projection.GetType().FullName + ".json");
 }