private async Task <TGGDBFContextType> GetContext(IGGDBFDataSource source) { if (source == null) { throw new ArgumentNullException(nameof(source)); } //TODO: This could load the context multiple times due to race conditions (but should be ok) if (!GGDBFHelpers.IsContextInitialized <TGGDBFContextType>()) { await GGDBFHelpers.CallInitialize <TGGDBFContextType>(source); } return(GGDBFHelpers.GetInstance <TGGDBFContextType>()); }
public async Task ReloadAsync(CancellationToken token = default) { await Source.ReloadAsync(token); await GGDBFHelpers.CallInitialize <TGGDBFContextType>(Source); }