0
我有一個界面問題,它定義了我的服務。我在Silverlight和WPF以及我的後端使用相同的接口。WCF與異步服務的SharedInterface定義
例如:
#if !SILVERLIGHT
[OperationContract(IsOneWay = false)]
SecurityOperationInfo LogonUser(string sessionId, string username, string password);
#else
[OperationContract(IsOneWay = false, AsyncPattern = true)]
IAsyncResult BeginLogonUser(string sessionId, string username, string password, AsyncCallback callback, object state);
SecurityOperationInfo EndLogonUser(IAsyncResult result);
#endif
現在的問題是,我使用在Silverlight的界面(它是工作良好)。現在我也想在WPF中使用異步方式,但我不想在服務器端實現開始和結束!但我的WPF項目鏈接到實現此接口的同一個DLL!
有什麼辦法以簡單的方式實現這一點?
正是我所搜索的...不知道爲什麼我不這樣做之前... –