Ejemplo n.º 1
0
 /// <summary>
 ///     This API supports the Entity Framework Core infrastructure and is not intended to be used
 ///     directly from your code. This API may change or be removed in future releases.
 /// </summary>
 public FileContextQueryContextFactory(
     [NotNull] QueryContextDependencies dependencies,
     [NotNull] IFileContextStoreCache storeCache,
     [NotNull] IDbContextOptions contextOptions)
     : base(dependencies)
 {
     _store = storeCache.GetStore(contextOptions.Extensions.OfType <FileContextOptionsExtension>().First());
 }
 public FileContextQueryContextFactory(
     [NotNull] QueryContextDependencies dependencies,
     [NotNull] IFileContextStoreCache storeCache,
     [NotNull] IDbContextOptions contextOptions)
 {
     _store        = storeCache.GetStore(contextOptions);
     _dependencies = dependencies;
 }
Ejemplo n.º 3
0
        /// <summary>
        ///     This API supports the Entity Framework Core infrastructure and is not intended to be used
        ///     directly from your code. This API may change or be removed in future releases.
        /// </summary>
        public FileContextDatabase(
            [NotNull] DatabaseDependencies dependencies,
            [NotNull] IFileContextStoreCache storeCache,
            [NotNull] IDbContextOptions options,
            [NotNull] IDiagnosticsLogger <DbLoggerCategory.Update> updateLogger)
            : base(dependencies)
        {
            Check.NotNull(storeCache, nameof(storeCache));
            Check.NotNull(options, nameof(options));
            Check.NotNull(updateLogger, nameof(updateLogger));

            _store        = storeCache.GetStore(options);
            _updateLogger = updateLogger;
        }
Ejemplo n.º 4
0
        public FileContextIntegerValueGenerator(IProperty _property, IFileContextStoreCache _storeCache)
        {
            property   = _property;
            storeCache = _storeCache;

            if (FileContextIntegerValueGeneratorFactory.LastIds.ContainsKey(property.DeclaringEntityType.Name))
            {
                ComputeLast();
            }
            else
            {
                storeCache.GetStore().GetTables(property.DeclaringEntityType);
                ComputeLast();
            }
        }
Ejemplo n.º 5
0
        public FileContextIntegerValueGenerator(IProperty _property, IFileContextStoreCache _storeCache, FileContextIntegerValueGeneratorCache _idCache, FileContextOptionsExtension options)
        {
            property   = _property;
            storeCache = _storeCache;
            idCache    = _idCache;

            if (idCache.LastIds.ContainsKey(property.DeclaringEntityType.Name))
            {
                ComputeLast();
            }
            else
            {
                storeCache.GetStore(options).GetTables(property.DeclaringEntityType);
                ComputeLast();
            }
        }
 public static IFileContextStore GetStore([NotNull] this IFileContextStoreCache storeCache, [NotNull] IDbContextOptions options)
 => storeCache.GetStore(options.Extensions.OfType <FileContextOptionsExtension>().First().Options);
Ejemplo n.º 7
0
 public FileContextIntegerValueGeneratorFactory(IFileContextStoreCache _storeCache)
 {
     storeCache = _storeCache;
 }
Ejemplo n.º 8
0
 /// <summary>
 ///     This API supports the Entity Framework Core infrastructure and is not intended to be used
 ///     directly from your code. This API may change or be removed in future releases.
 /// </summary>
 public FileContextValueGeneratorSelector([NotNull] ValueGeneratorSelectorDependencies dependencies, IFileContextStoreCache _storeCache)
     : base(dependencies)
 {
     _fileContextFactory = new FileContextIntegerValueGeneratorFactory(_storeCache);
 }
 /// <summary>
 ///     This API supports the Entity Framework Core infrastructure and is not intended to be used
 ///     directly from your code. This API may change or be removed in future releases.
 /// </summary>
 public static IFileContextStore GetStore([NotNull] this IFileContextStoreCache storeCache, [NotNull] IDbContextOptions options)
 => storeCache.GetStore();
Ejemplo n.º 10
0
 /// <summary>
 ///     This API supports the Entity Framework Core infrastructure and is not intended to be used
 ///     directly from your code. This API may change or be removed in future releases.
 /// </summary>
 public FileContextValueGeneratorSelector([NotNull] ValueGeneratorSelectorDependencies dependencies, IFileContextStoreCache _storeCache, FileContextIntegerValueGeneratorCache _idCache, IDbContextOptions contextOptions)
     : base(dependencies)
 {
     _fileContextFactory = new FileContextIntegerValueGeneratorFactory(_storeCache, _idCache, contextOptions);
 }
 public FileContextIntegerValueGeneratorFactory(IFileContextStoreCache _storeCache, FileContextIntegerValueGeneratorCache _idCache, IDbContextOptions _contextOptions)
 {
     storeCache = _storeCache;
     idCache    = _idCache;
     options    = _contextOptions.Extensions.OfType <FileContextOptionsExtension>().First();
 }