使用流返回多个值
我有方法:
var listOfFiles=service .GetFiles(pathsOfFiles.ToArray();
服务是我的带流媒体的 wcf 服务,我想在该服务上有方法,例如:
public List<Stream, file> GetFiles(string[] paths)
{
List<Stream, file> files =new List<Stream, file>
foreach(string path in pathsOfFiles)
{
files.add(path, new FileStream(filename, FileMode.Open))
}
return files
}
现在我只有方法(如下)可以正常工作,但我必须将其转换为我在顶部描述的函数。
public Stream GetData(string filename)
{
FileStream fs = new FileStream(filename, FileMode.Open);
return fs;
}
我必须从服务路径中获取文件名
I have method:
var listOfFiles=service .GetFiles(pathsOfFiles.ToArray();
service is my wcf service with streaming ,and I want to have method on this service like :
public List<Stream, file> GetFiles(string[] paths)
{
List<Stream, file> files =new List<Stream, file>
foreach(string path in pathsOfFiles)
{
files.add(path, new FileStream(filename, FileMode.Open))
}
return files
}
Now I have only method (which is below) which works fine, but I must convert it to function which I descibe on top.
public Stream GetData(string filename)
{
FileStream fs = new FileStream(filename, FileMode.Open);
return fs;
}
I must get from service paths to know what is the name of file
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你可以使用类似的东西
You can use something like