When starting a console version of the ApplicationServer, it outputs “Press Ctrl + C to terminate”. Is there a way to prevent it doing so? I presumed originally that by subclassing ApplicationServer and overriding the OnStarting() method I would be able to prevent it. It seems to be more deeply embedded than that though.
Just to clarify, I’m not concerned about preventing the application being terminated, I just don’t want the message showing up whenever the server is enabled.
Is there a simple (or complex if necessary) way to do this?
I think rather than find my way through the NetworkServer configuration system, I’ll opt to temporarily suppress console output while the server is starting up; that will suffice while things are still in development.
Starting next Beta you can override the ConsoleServerFooter property of the ApplicationServer class. You can set it to any arbitrary message or to empty/null string:
class ConsoleServer : ApplicationServer
{
public ConsoleServer(String applicationName, params Type[] serviceTypes)
: base(applicationName, serviceTypes)
{
}
protected override string ConsoleServerFooter
{
get
{
return "";
}
}
}