Ejemplo n.º 1
0
        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>());
        }
Ejemplo n.º 2
0
        public async Task ReloadAsync(CancellationToken token = default)
        {
            await Source.ReloadAsync(token);

            await GGDBFHelpers.CallInitialize <TGGDBFContextType>(Source);
        }