async Task await void?
! ... . .
"", .. (Task Task<T>), async await.
. async void, async Task - ( ) . ( Main):
One
private async void Initializer()
{
var store = InitLocalStore();
await InitSyncContext(store);
...
}
private async Task InitSyncContext(MobileServiceSQLiteStore store)
{
await Client.SyncContext.InitializeAsync(store);
}
Initializer, , async void. async Task "Async". , InitSyncContext, store . , async await. () , . return. . :
private void Initializer()
{
var store = InitLocalStore();
InitSyncContext(store);
...
}
private async void InitSyncContext(MobileServiceSQLiteStore store)
{
await Client.SyncContext.InitializeAsync(store);
}
! , , , , "", , . InitSyncContext async void. async void , . Task , , . await, , , .
:
private async Task InitializerAsync()
{
var store = InitLocalStore();
await InitSyncContextAsync(store);
...
}
private Task InitSyncContextAsync(MobileServiceSQLiteStore store)
{
return Client.SyncContext.InitializeAsync(store);
}
Main , - async .Result, .Wait().