您将如何在 WPF Windows 应用程序的后台运行 WCF 命名管道服务?我似乎找不到在 WPF 应用程序中运行 WCF 服务器的任何示例。
有任何想法吗?
我目前在 Application_Startup 中使用以下代码。这需要用它自己的线程运行吗?
Using Host As ServiceModel.ServiceHost = New ServiceModel.ServiceHost(GetType(Service), New Uri(("net.pipe://localhost")))
'
Host.AddServiceEndpoint(GetType(IService), New ServiceModel.NetNamedPipeBinding, "Test")
Host.Open()
'
End Using