Open danielcirket opened 5 years ago
Might be worth adding an extension method called AddProjections
. then you could pass in some options to configure the projection writers/projections. For example:
.AddProjections(options =>
{
// This would scan and register all projection writers/projections
options.AddDefaultProjectors();
// Otherwise you could be explicit like so:
options.AddProjector<T>(writers =>
{
writers.Register<T>();
});
});
We should have one or more methods for dealing with
IProjector<>
andIProjection
registrations for consumers to streamline getting projections up and running in an easy way.We provide a
BackgroundProjector<T>
out of the box, but users should be able to use their own projectors, e.g.PollingProjector<T>
for polling a non-push event source.