Current TBot implementation is full of static functions and spare logic put in different classes.
This refactors aims to group the logic into specific classes in order to improve code maintenance and let future development / feature development eased.
Refactors aimed to let TBot to respect SOLID principles.
To summarize in a couple of points:
BOT Logic has been kept the same
Removal of static members / function to let multiple instances of a class
TelegramMessenger class now can handle multiple instances of the BOT main class ( Called TBotMain . Not very creative on variable naming sorry :) )
OGamedService now can be shutdown and is unique for each TBot instance.
Still in progress:
Testing with more than one instance
NB This may work since Timers are executed on a thread drawn from the threadpool, meaning that hypothetically, multiple TBotMain may be instantiated without any penalty.
Better manage logging
IE logs will be filled with events, without truly understand to what instance may belong. Although this is not a major problem right now, it may be later.
Current TBot implementation is full of static functions and spare logic put in different classes. This refactors aims to group the logic into specific classes in order to improve code maintenance and let future development / feature development eased. Refactors aimed to let TBot to respect SOLID principles.
To summarize in a couple of points:
Still in progress: