Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Regarding an interface definition #4

Open
asifshiraz opened this issue May 19, 2017 · 0 comments
Open

Question: Regarding an interface definition #4

asifshiraz opened this issue May 19, 2017 · 0 comments

Comments

@asifshiraz
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant