private async void InitializeStore() { if (!SyncContext.IsInitialized) { _store = new MobileServiceSQLiteStore(_path); var method = typeof(MobileServiceSQLiteStoreExtensions).GetMethod("DefineTable", new[] { typeof(MobileServiceSQLiteStore) }); foreach (var syncTablesKey in _syncTables.Keys) { var generic = method?.MakeGenericMethod(syncTablesKey); generic?.Invoke(null, new object[] { _store }); } await SyncContext.InitializeAsync(_store); } }
private async Task <OperationBatch> CreateBatch() { await context.InitializeAsync(); return(new OperationBatch(context)); }