私のWCFサービスライブラリにSystem.Windows.Forms
を追加できません。私のWCFサービスライブラリに `System.Windows.Forms`リファレンスを追加できません
GetItems(string path)
のList<ListViewItem>
を返信したいと思いますが、System.Windows.Forms
の参照を追加しようとしましたが、WCFサービスライブラリがサポートしていないようです。
どうすればいいですか?
namespace WcfServiceLibrary1
{
[ServiceContract]
public interface IFileManager
{
[OperationContract]
List<ListViewItem> collection(string path);
}
}
これは私のItem.cs
クラスです:WCFは、相互運用可能サービスプラットフォームとなるように設計され
namespace WcfServiceLibrary1
{
[DataContract]
public class Item
{
[DataMember]
public string name;
[DataMember]
public string path;
[DataMember]
public long size;
[DataMember]
public DateTime date;
}
}
私は、Windowsフォームアプリケーションを作成し、WCFサービスをクライアントとして使用する必要があると思います。それから、そのメトトを呼び出して、その結果をあなたのフォームに表示することができます。 WCFの目的は、ユーザーにデータを表示しないことです。 – Fer