public override IList GetSource(string sourceName)
{
var list = new List<LookupValue>();
if (!string.IsNullOrEmpty(countryCode))
{
var task = CurrentState.Instance.ServiceClient.ListAllProvinces(countryCode);
var items = task.GetAwaiter().GetResult();
list.AddRange(items);
}
return list;
}
I want to call an async method from my GetSource provider...is there a documented approach to achieve this? The above code locks and causes the app to stall.