.Net核心WCF Connected Services同步方法 [英] .Net core WCF Connected Services synchronous methods
问题描述
.Net核心项目仅为WCF服务生成异步方法,有没有办法像在常规.net项目中那样使用同步方法?
.Net core project is generating only async methods for WCF service, is there any way to use synchronous methods like in regular .net project?
在常规.Net中有同步和异步方法,例如:
WcfClient.MethodName和WcfClient.MethodNameAsync
In regular .Net there was both sync and async methods like: WcfClient.MethodName and WcfClient.MethodNameAsync
.Net核心中只有WcfClient.MethodNameAsync
In .Net core there are only WcfClient.MethodNameAsync
请帮助
但是此解决方案还会引起其他问题,还有关于如何生成同步函数的想法吗?
But this solution causes other problems, any ideas how to generate sync functions?
推荐答案
检查一下,<在href = https://github.com/Azure/azure-storage-net/issues/367 rel = nofollow noreferrer>此处,他们会掩盖您可能感兴趣的一些事实。
您可以更改项目以避免Azure或伪造的同步调用。
Check this out, here they disguise some facts that you may be interested. You either change your project to avoid Azure or fake synchronous calls.
这篇关于.Net核心WCF Connected Services同步方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!