C #의 getter 또는 setter에서 비동기 메서드를 호출하는 가장 우아한 방법은 무엇인가요?
다음은 자신을 설명하는 데 도움이되는 의사 코드입니다.
async Task<IEnumerable> MyAsyncMethod()
{
return await DoSomethingAsync();
}
public IEnumerable MyList
{
get
{
//call MyAsyncMethod() here
}
}