私のWindowsサービスプロジェクトのこのコードは私にコンパイルエラーを与えます 無効なInitializeBridgeシグネチャを持つメソッドが必要です
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);
}