orleans-architecture-patterns-code
orleans-architecture-patterns-code copied to clipboard
Question: Regarding an interface definition
In the BankAccountAggregateBalance class used for event sourcing example, an interface ICanApplyEvent<TEvent, TState> is being used to apply an event to modify an object state.
We are invoking this method on a TState object, to apply the TEvent to it. But I find it redundant to pass in the TState object also, on which we apply the event. This is not a static method, but an instance method, so it knows to apply the TEvent on itself. Can you advise what benefit this is providing, and why not use this, instead of the passed TState.