Okay i am working with orleans and all i really want to do is sort an list after a value in state. i try to this by doing this
public async Task SortEntries()
{
State.Entries.OrderBy(GetComparator);
}
private async decimal GetComparator(IEntryGrain x)
{
var a = await x.GetState();
return Task.FromResult(a);
}
but this got two wrongs in them that i am trying to solve. first of the Task SortEntries task lacks an await operator which i guess might still work the problem is that GetComparator says an async method must be void, Task or Task.The most neat way i first thought would be to do all the sorting in SortEntries like this
State.Entries.OrderBy((x) => x.GetState().Result.TotalPoints);
But the GetState() need to be async with an await but i cant do that on the orderBy or sort. Anyone who can push me in the right direction or encountered something similar