实现服务操作的类是否需要为每个操作连接



如果一个类实现了ServiceControlServiceSuspendServiceShutdownServiceCustomCommandServicePowerEvent和/或ServiceSessionChange,这些动作是否仍然需要通过HostConfigurator WhenXXX方法连接起来?

如果服务类实现了接口,例如 ServiceControl,则无需配置 WhenStarted 和其他方法,因为 Topshelf 将使用接口方法。

从文档中: http://topshelf.readthedocs.io/en/latest/configuration/config_api.html#simple-service

最新更新