I have defined new method in IFoo:

[OperationContract]
List<string> GetChatSubjects(string siteId);

and defined this method in FooReferece.svc.cs

public List<string> GetChatSubjects(string siteId)
{
  ...  
  return List<string>;
}

When I try to get this reference only

  • void GetChatSubjectsAsync();
  • EventHandler GetChatSubjectsCompleted();

methods are shown in my service reference. I need GetChatSubjects() method which return List. I need method's itself. Why only listed methods are shown above?

By the way, my project in Silverlight.

有帮助吗?

解决方案

WEll because Silverlight supports only async calls. The reason is that silverlight runs on the browser UI thread. and sync call will block the UI till the callback is received.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top