jjzjj

ServiceBase

全部标签

Windows 服务实现 IDisposable - 这是不好的做法吗?

我遇到过这段代码:publicclassServiceLauncher2:ServiceBase,IDisposable然后是://////Disposesthecontrollers/////Thisisdeclarednewasopposedtooverridebecausethebaseclasshastobeableto//callitsownDispose(bool)methodandnotthisone.Wecouldjustaseasilyname//thismethodsomethingdifferent,butkeepingitDisposeisjustasvalid

c# - 服务未响应控制功能(错误 2186)

我正在Windows平台上使用.NET开发服务。它一直工作到昨天......但今天它不想启动!!!看起来很奇怪,我觉得我错过了一些东西......我也曾尝试将源恢复到上一个​​工作版本,但没有其他任何反应:netstart输出:Theserviceisnotrespondingtothecontrolfunction.什么可能导致此故障?可能你们中的大多数人都想了解更多。那么,让我向您展示一些代码:服务代码:#ifDEBUGclassiGeckoService:DebuggableService#elseclassiGeckoService:ServiceBase#endif{stat
12