ApplicationInstance.Start(ServerManager)和ServerManager.Start(ApplicationInstance)之间的区别

时间:2018-06-13 08:02:49

标签: c# .net opc-ua unified-automation-sdk

我正在尝试理解我派生的代码,并且通过启动OPC-UA服务器调用两个方法我很困惑。我正在使用OPC-UA的统一自动化实现。

首先叫

UnifiedAutomation.UaBase.ApplicationInstance.Start(ServerManager,,)

然后调用

UnifiedAutomation.UaServer.ServerManager.Start(ApplicationInstance)

这是抽象代码:

var application = new ApplicationInstance();
var serverManager = new ServerManager("companiURI", "applicationName");
...
application.Start(serverManager, p=>{}, null)
if (!Environment.UserInteractive)
{
    serverManager.Start(application);
}

那么这两种方法有什么区别?

0 个答案:

没有答案