如果一个类实现了ServiceControl
、ServiceSuspend
、ServiceShutdown
、ServiceCustomCommand
、ServicePowerEvent
和/或ServiceSessionChange
,这些动作是否仍然需要通过HostConfigurator
WhenXXX
方法连接起来?
如果服务类实现了接口,例如 ServiceControl,则无需配置 WhenStarted
和其他方法,因为 Topshelf 将使用接口方法。
从文档中: http://topshelf.readthedocs.io/en/latest/configuration/config_api.html#simple-service