the correct syntax is:
CrossMediaManager.Current.MediaItemFinished += async (s, e) =>
{
customDialog.Cancel();
await ResumeSong(7, TimespanIngamemenuPosition);
};
but the event callback will not await as it does not support async callbacks. it basically a fire and forget call. so the following will also work the same:
CrossMediaManager.Current.MediaItemFinished += (s, e) =>
{
customDialog.Cancel();
ResumeSong(7, TimespanIngamemenuPosition);
};
the await is only useful if there is some code after the ResumeSong() call.