Improve a simple event handler

Salih Dincer salihdb at hotmail.com
Tue Jan 18 01:23:25 UTC 2022


On Saturday, 15 January 2022 at 23:15:16 UTC, JN wrote:
> I am writing a simple event handler object for observer pattern.
>
> https://gist.github.com/run-dlang/d58d084752a1f65148b33c796535a4e2
>
> (note: the final implementation will use an array of listeners,

Did you especially make an effort not to use money DI (Dependency 
injection)? Your codes will be more delicious if you implement 
DI. You can find its simple implementation 
[here.](https://forum.dlang.org/post/roqnezzxcuorscnmanhh@forum.dlang.org)

If you get the ConnectionSetup working, you can setup without 
knowing the service parameters.

Salih


More information about the Digitalmars-d-learn mailing list