我无法添加System.Windows.Forms
到我的 WCF 服务库。
我想List<ListViewItem>
从我的方法中返回一个GetItems(string path)
,我也尝试添加引用System.Windows.Forms
但没有发现它看起来像 WCF 服务库不支持它。
有什么想法我该怎么做?
namespace WcfServiceLibrary1
{
[ServiceContract]
public interface IFileManager
{
[OperationContract]
List<ListViewItem> collection(string path);
}
}
这是我的Item.cs
课:
namespace WcfServiceLibrary1
{
[DataContract]
public class Item
{
[DataMember]
public string name;
[DataMember]
public string path;
[DataMember]
public long size;
[DataMember]
public DateTime date;
}
}