stefan8893 / simple-trading

MIT License
1 stars 0 forks source link

Get rid of manually created use-case interfaces #78

Closed stefan8893 closed 1 month ago

stefan8893 commented 1 month ago

Right now, there is the following inheritance hierachy:

SomethingInteractor -> ISomething -> IInteractor<SomeRequestModel, SomeResponseModel>

Get rid of the ISomething interface and let the interactor directly implement the IInteractor<...> interface. Then create a source generator that creates a proxy for the concrete interactor and an interface that is the equivalent to ISomething.

Source generated: SomethingInteractorProxy -> ISomething Design-time: SomethingInteractor -> IInteractor<SomeRequestModel, SomeResponseModel>

The created proxy should invoke the concrete interactor and should also be able to deal with cross-cutting concerns.