I do not follow SOLID strictly in general, but I do try making sure to separate responsibilities of my classes.
I was developing a small app with a Windows service powered by Topshelf and realized that I don't quite understand what should
Program class do. Obviously I could probably shove most code into
Main, but what is the reasonable amount of responsibilities that this class should have?
Programis just a housing for
Main, which is just an entry-point for the app, and the rest of the code should be moved to a separate class.
Mainshould only be a composition root of the application, with a separate class handling general workflow (like graceful shutdowns on exceptions) and calls to business logic.
Another static method in
Programshould be handling the composition and calls to application class.
Programis the application workflow class and its nonstatic methods call business logic, while
Mainis an entry point.