如何在打开的API代理工具中处理流输入/输出
[HttpGet]
public ActionResult<Stream> ReadStreamFromFile(string fileNameWithFullPath)
{
byte[] byteArray = System.IO.File.ReadAllBytes(fileNameWithFullPath);
System.IO.MemoryStream memoryStream = new MemoryStream(byteArray);
return memoryStream;
}
当我尝试使用nswag和Microsoft编码支持的DLL创建代理时,流是创建一类复杂类型而不是简单类型的类,这会在尝试调用服务时在运行时遇到问题。
代理生成设置有什么方法将其称为io.stream而不是.stream?
请建议。 阿玛
[HttpGet]
public ActionResult<Stream> ReadStreamFromFile(string fileNameWithFullPath)
{
byte[] byteArray = System.IO.File.ReadAllBytes(fileNameWithFullPath);
System.IO.MemoryStream memoryStream = new MemoryStream(byteArray);
return memoryStream;
}
When I trying to create proxy using NSWAg and Microsoft CodeDOM supported DLLs, Stream is created a class of complex type instead of simple type, which causes getting issues at runtime, when trying to calling service.
Is there any way in proxy generation setting to refer it as IO.Stream instead of .Stream?
Please suggest.
amaR
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论