Async methods in widget extensions

Hi,

I created a widget extension with numerous methods, some of these methods are async and they seem to be giving me issues on the frontend side.

Whenever I call an async method (Ex: $customWidgetExtension.AsyncMethod()) the widget where I place this extension displays "System.Threading.Tasks.Task`1" instead of the

real value. How can I make my async method return the real value in telligent ? because this method I do have to await.

Regards,

Silviu

Parents Reply
  • I m implementing Machine Translation for threads in community, I'm posting to an API the thread body text and it should get translated, and the API's translation may delay, so I have to you async patterns. I'm implemented the Api calls in a telligent plugin extension, and I want to get the translation in the UI, (velocity or javascript) to replace the text with it's translation.

Children