Exemplo 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 InMemoryStoreSource(
     [NotNull] IInMemoryStoreCache storeCache,
     [NotNull] IInMemoryTableFactory tableFactory)
 {
     _storeCache   = storeCache;
     _tableFactory = tableFactory;
 }
Exemplo n.º 2
0
 /// <summary>
 ///     This is an internal API that supports the Entity Framework Core infrastructure and not subject to
 ///     the same compatibility standards as public APIs. It may be changed or removed without notice in
 ///     any release. You should only use it directly in your code with extreme caution and knowing that
 ///     doing so can result in application failures when updating to a new Entity Framework Core release.
 /// </summary>
 public InMemoryQueryContextFactory(
     [NotNull] QueryContextDependencies dependencies,
     [NotNull] IInMemoryStoreCache storeCache,
     [NotNull] IDbContextOptions contextOptions)
     : base(dependencies)
 {
     _store = storeCache.GetStore(contextOptions);
 }
 /// <summary>
 ///     This is an internal API that supports the Entity Framework Core infrastructure and not subject to
 ///     the same compatibility standards as public APIs. It may be changed or removed without notice in
 ///     any release. You should only use it directly in your code with extreme caution and knowing that
 ///     doing so can result in application failures when updating to a new Entity Framework Core release.
 /// </summary>
 public InMemoryQueryContextFactory(
     QueryContextDependencies dependencies,
     IInMemoryStoreCache storeCache,
     IDbContextOptions contextOptions)
 {
     _store       = storeCache.GetStore(contextOptions);
     Dependencies = dependencies;
 }
        /// <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 InMemoryDatabase(
            [NotNull] DatabaseDependencies dependencies,
            [NotNull] IInMemoryStoreCache 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;
        }
Exemplo n.º 5
0
 /// <summary>
 ///     This is an internal API that supports the Entity Framework Core infrastructure and not subject to
 ///     the same compatibility standards as public APIs. It may be changed or removed without notice in
 ///     any release. You should only use it directly in your code with extreme caution and knowing that
 ///     doing so can result in application failures when updating to a new Entity Framework Core release.
 /// </summary>
 public InMemoryDatabase(
     DatabaseDependencies dependencies,
     IInMemoryStoreCache storeCache,
     IDbContextOptions options,
     IDesignTimeModel designTimeModel,
     IUpdateAdapterFactory updateAdapterFactory,
     IDiagnosticsLogger <DbLoggerCategory.Update> updateLogger)
     : base(dependencies)
 {
     _store                = storeCache.GetStore(options);
     _designTimeModel      = designTimeModel;
     _updateAdapterFactory = updateAdapterFactory;
     _updateLogger         = updateLogger;
 }
Exemplo n.º 6
0
        /// <summary>
        ///     This is an internal API that supports the Entity Framework Core infrastructure and not subject to
        ///     the same compatibility standards as public APIs. It may be changed or removed without notice in
        ///     any release. You should only use it directly in your code with extreme caution and knowing that
        ///     doing so can result in application failures when updating to a new Entity Framework Core release.
        /// </summary>
        public InMemoryDatabase(
            DatabaseDependencies dependencies,
            IInMemoryStoreCache storeCache,
            IDbContextOptions options,
            ICurrentDbContext context,
            IUpdateAdapterFactory updateAdapterFactory,
            IDiagnosticsLogger <DbLoggerCategory.Update> updateLogger)
            : base(dependencies)
        {
            Check.NotNull(storeCache, nameof(storeCache));
            Check.NotNull(options, nameof(options));
            Check.NotNull(updateAdapterFactory, nameof(updateAdapterFactory));
            Check.NotNull(updateLogger, nameof(updateLogger));

            _store                = storeCache.GetStore(options);
            _getDesignModel       = () => context.Context.DesignTimeModel;
            _updateAdapterFactory = updateAdapterFactory;
            _updateLogger         = updateLogger;
        }
 /// <summary>
 ///     This is an internal API that supports the Entity Framework Core infrastructure and not subject to
 ///     the same compatibility standards as public APIs. It may be changed or removed without notice in
 ///     any release. You should only use it directly in your code with extreme caution and knowing that
 ///     doing so can result in application failures when updating to a new Entity Framework Core release.
 /// </summary>
 public static IInMemoryStore GetStore(this IInMemoryStoreCache storeCache, IDbContextOptions options)
 => storeCache.GetStore(options.Extensions.OfType <InMemoryOptionsExtension>().First().StoreName);