-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Right now there is simply an event being emitted when a new entity update is ready.
Part of the issue here is that it is triggering on everything, which is less than ideal as we want to simply throw away the results of certain entities but still need to consume through the stream to make sure we are aligned when we hit entities we want.
The first step for this is making an interface that lets the consumer describe ahead of parsing what entities they actually care about to create a list of discarded entities to be ignored and optimized away.
I believe for this interface we can describe it in this way
public void OnEntityCreate<TEntity>(Action<TEntity> callback): where TEntity is BaseEntity
public void OnEntityUpdate<TEntity>(Action<TEntity> callback): where TEntity is BaseEntity
public void OnEntityDelete<TEntity>(Action<TEntity> callback): where TEntity is BaseEntity Each of these actions will take in a callback function that will be invoked when the given entity event happens. When this subscription is added we will have an internal tracking at some point that can identify what types have been requested and ignore types that are not requested.
Code generation will be used to create the map of available types which will allow very nice strongly typed interfacing here that gives access to the entity events.