我的 Windows 服务项目中的这段代码给了我编译错误 Expected a method with void InitializeBridge signature
static void Main(string[] args)
{
if (args != null && args.Length == 1 && args[0].StartsWith("-c"))
{
BridgeService bridgeService = new BridgeService();
if (Vytru.Platform.Bridge.Configuration.LicenseValidetor.ValidCountAndTypeDevices())
{
Console.WriteLine("Bridge Service Is Started ......");
var daemonThread = new Thread(SharedData.InitializeBridge);
daemonThread.Start();
}
else
{
Console.WriteLine("Bridge Service License is not Valid ...");
}
}
else
{
ServiceBase[] ServicesToRun;
ServicesToRun = new ServiceBase[]
{
new BridgeService()
};
ServiceBase.Run(ServicesToRun);
}
}
这是我的静态方法InitializeBridge
..
public static bool InitializeBridge()
{
return DeviceList.All(CreateBridgeConnection);
}