Frage

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.

War es hilfreich?

Lösung

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top