I have created a console application which have a menu that allow me to navigate between the menu items. I handle the navigation logic in this method:
public vir
The short answer to doing what you want to do is that you simply can't.
Think about it: you are trying to have an interactive program (that users can interact with via the keyboard). But you are also making it a daemon (a deamon runs the background and doesn't interact with users directly). These are two contradictory goals.
When systemd
(or supervisord
, or upstart
or really any system services program) runs your application as a service, it doesn't give it a way to interact with users, since these applications want to be daemons - which means users can't interact with them.
So, ask yourself what you want to do: do you want to make an interactive program or not? If you want make an interactive program you can't run it via supervisor. Run it directly, via dotnet /path/to/your.dll
.
Other comments:
ReadKey
may have issues, but certainly not in the common case that you are drying to do, which seems to be Linux on x86_64.
OmniSharp is a plugin for IDEs/text-editors to make development easier. It provides auto completion and real time syntax highlighting. It's not involved when you are running your application.