How to detect if Topshelf is running in console mode

前端 未结 2 1436
星月不相逢
星月不相逢 2021-02-13 13:21

I am using Topshelf combined with FluentSchedule for a Windows Service.

However, I want to be able to trial-run the application to simply start up and not execute the Fl

2条回答
  •  心在旅途
    2021-02-13 14:03

    You can use Environment.UserInteractive . Technically this won't work in 100% of the cases as it is possible to run a service in user-interactive mode, but this is a fringe case.

提交回复
热议问题