Esempio 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 StateManager(
            [NotNull] IInternalEntityEntryFactory factory,
            [NotNull] IInternalEntityEntrySubscriber subscriber,
            [NotNull] IInternalEntityEntryNotifier notifier,
            [NotNull] IValueGenerationManager valueGeneration,
            [NotNull] IModel model,
            [NotNull] IDatabase database,
            [NotNull] IConcurrencyDetector concurrencyDetector,
            [NotNull] ICurrentDbContext currentContext,
            [NotNull] ILoggingOptions loggingOptions)
        {
            _factory             = factory;
            _subscriber          = subscriber;
            Notify               = notifier;
            ValueGeneration      = valueGeneration;
            _model               = model;
            _database            = database;
            _concurrencyDetector = concurrencyDetector;
            Context              = currentContext.Context;

            if (loggingOptions.SensitiveDataLoggingEnabled)
            {
                _sensitiveLoggingEnabled = true;
            }
        }
 public StateManagerDependencies(
     [NotNull] IInternalEntityEntryFactory internalEntityEntryFactory,
     [NotNull] IInternalEntityEntrySubscriber internalEntityEntrySubscriber,
     [NotNull] IInternalEntityEntryNotifier internalEntityEntryNotifier,
     [NotNull] IValueGenerationManager valueGenerationManager,
     [NotNull] IModel model,
     [NotNull] IDatabase database,
     [NotNull] IConcurrencyDetector concurrencyDetector,
     [NotNull] ICurrentDbContext currentContext,
     [NotNull] IEntityFinderSource entityFinderSource,
     [NotNull] IDbSetSource setSource,
     [NotNull] IEntityMaterializerSource entityMaterializerSource,
     [NotNull] IExecutionStrategyFactory executionStrategyFactory,
     [NotNull] ILoggingOptions loggingOptions,
     [NotNull] IDiagnosticsLogger <DbLoggerCategory.Update> updateLogger,
     [NotNull] IDiagnosticsLogger <DbLoggerCategory.ChangeTracking> changeTrackingLogger)
 {
     InternalEntityEntryFactory    = internalEntityEntryFactory;
     InternalEntityEntrySubscriber = internalEntityEntrySubscriber;
     InternalEntityEntryNotifier   = internalEntityEntryNotifier;
     ValueGenerationManager        = valueGenerationManager;
     Model                    = model;
     Database                 = database;
     ConcurrencyDetector      = concurrencyDetector;
     CurrentContext           = currentContext;
     EntityFinderSource       = entityFinderSource;
     SetSource                = setSource;
     EntityMaterializerSource = entityMaterializerSource;
     ExecutionStrategyFactory = executionStrategyFactory;
     LoggingOptions           = loggingOptions;
     UpdateLogger             = updateLogger;
     ChangeTrackingLogger     = changeTrackingLogger;
 }
Esempio 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 StateManager(
            [NotNull] IInternalEntityEntryFactory factory,
            [NotNull] IInternalEntityEntrySubscriber subscriber,
            [NotNull] IInternalEntityEntryNotifier notifier,
            [NotNull] IValueGenerationManager valueGeneration,
            [NotNull] IModel model,
            [NotNull] IDatabase database,
            [NotNull] IConcurrencyDetector concurrencyDetector,
            [NotNull] ICurrentDbContext currentContext,
            [NotNull] IDbContextOptions contextOptions)
        {
            _factory             = factory;
            _subscriber          = subscriber;
            Notify               = notifier;
            ValueGeneration      = valueGeneration;
            _model               = model;
            _database            = database;
            _concurrencyDetector = concurrencyDetector;
            Context              = currentContext.Context;

            if (contextOptions
                .Extensions
                .OfType <CoreOptionsExtension>()
                .FirstOrDefault()
                ?.IsSensitiveDataLoggingEnabled == true)
            {
                _sensitiveLoggingEnabled = true;
            }
        }
        public void EnsureInitialized(IServiceProvider serviceProvider, IDbContextOptions options)
        {
            this.serviceProvider = serviceProvider;
            this.contextOptions  = options;

            internalEntityEntryNotifier = serviceProvider.GetService <IInternalEntityEntryNotifier>();
            changeTrackingLogger        = serviceProvider.GetService <IDiagnosticsLogger <DbLoggerCategory.ChangeTracking> >();
            changeDetector = serviceProvider.GetService <IChangeDetector>();
        }
        public IDbContextServices Initialize(IServiceProvider scopedProvider, IDbContextOptions contextOptions, DbContext context)
        {
            this.serviceProvider = scopedProvider;
            this.contextOptions  = contextOptions;
            this.providerContext = (AbstraXProviderDataContext)context;

            IInternalEntityEntryNotifier internalEntityEntryNotifier = scopedProvider.GetService <IInternalEntityEntryNotifier>();

            return(this);
        }
Esempio n. 6
0
 public ThrowingMonsterStateManager(
     IInternalEntityEntryFactory factory,
     IInternalEntityEntrySubscriber subscriber,
     IInternalEntityEntryNotifier notifier,
     IValueGenerationManager valueGeneration,
     IModel model,
     IDatabase database)
     : base(factory, subscriber, notifier, valueGeneration, model, database)
 {
 }
 public ThrowingMonsterStateManager(
     IInternalEntityEntryFactory factory,
     IInternalEntityEntrySubscriber subscriber,
     IInternalEntityEntryNotifier notifier,
     IValueGenerationManager valueGeneration,
     IModel model,
     IDatabase database)
     : base(factory, subscriber, notifier, valueGeneration, model, database)
 {
 }
 public ThrowingMonsterStateManager(
     IInternalEntityEntryFactory factory,
     IInternalEntityEntrySubscriber subscriber,
     IInternalEntityEntryNotifier notifier,
     IValueGenerationManager valueGeneration,
     IModel model,
     IDatabase database,
     IConcurrencyDetector concurrencyDetector,
     DbContext context)
     : base(factory, subscriber, notifier, valueGeneration, model, database, concurrencyDetector, context)
 {
 }
 public ThrowingMonsterStateManager(
     IInternalEntityEntryFactory factory,
     IInternalEntityEntrySubscriber subscriber,
     IInternalEntityEntryNotifier notifier,
     IValueGenerationManager valueGeneration,
     IModel model,
     IDatabase database,
     IConcurrencyDetector concurrencyDetector,
     ICurrentDbContext currentContext)
     : base(factory, subscriber, notifier, valueGeneration, model, database, concurrencyDetector, currentContext)
 {
 }
 public StateManagerProxy(
     IInternalEntityEntryFactory factory,
     IInternalEntityEntrySubscriber subscriber,
     IInternalEntityEntryNotifier notifier,
     IValueGenerationManager valueGeneration,
     IModel model,
     IDatabase database,
     IConcurrencyDetector concurrencyDetector,
     ICurrentDbContext currentContext)
     : base(factory, subscriber, notifier, valueGeneration, model, database, concurrencyDetector, currentContext)
 {
     IsInitialized = true;
 }
Esempio n. 11
0
 public ThrowingMonsterStateManager(
     IInternalEntityEntryFactory factory,
     IInternalEntityEntrySubscriber subscriber,
     IInternalEntityEntryNotifier notifier,
     IValueGenerationManager valueGeneration,
     IModel model,
     IDatabase database,
     IConcurrencyDetector concurrencyDetector,
     ICurrentDbContext currentContext,
     ILoggingOptions loggingOptions,
     IDiagnosticsLogger <DbLoggerCategory.Update> updateLogger)
     : base(factory, subscriber, notifier, valueGeneration, model, database, concurrencyDetector, currentContext, loggingOptions, updateLogger)
 {
 }
Esempio n. 12
0
 public ComBoostStateManager(
     IInternalEntityEntryFactory factory,
     IInternalEntityEntrySubscriber subscriber,
     IInternalEntityEntryNotifier notifier,
     IValueGenerationManager valueGeneration,
     IModel model,
     IDatabase database,
     IConcurrencyDetector concurrencyDetector,
     ICurrentDbContext currentContext,
     CurrentDatabaseContext currentDatabase)
     : base(factory, subscriber, notifier, valueGeneration, model, database, concurrencyDetector, currentContext)
 {
     _CurrentDatabase = currentDatabase;
 }
Esempio n. 13
0
 public StateManager(
     [NotNull] IInternalEntityEntryFactory factory,
     [NotNull] IInternalEntityEntrySubscriber subscriber,
     [NotNull] IInternalEntityEntryNotifier notifier,
     [NotNull] IValueGenerationManager valueGeneration,
     [NotNull] IModel model,
     [NotNull] IDatabase database)
 {
     _factory        = factory;
     _subscriber     = subscriber;
     Notify          = notifier;
     ValueGeneration = valueGeneration;
     _model          = model;
     _database       = database;
 }
Esempio n. 14
0
 /// <summary>
 ///     Clones this dependency parameter object with one service replaced.
 /// </summary>
 /// <param name="internalEntityEntryNotifier"> A replacement for the current dependency of this type. </param>
 /// <returns> A new parameter object with the given service replaced. </returns>
 public StateManagerDependencies With([NotNull] IInternalEntityEntryNotifier internalEntityEntryNotifier)
 => new StateManagerDependencies(
     InternalEntityEntryFactory,
     InternalEntityEntrySubscriber,
     internalEntityEntryNotifier,
     ValueGenerationManager,
     Model,
     Database,
     ConcurrencyDetector,
     CurrentContext,
     EntityFinderSource,
     SetSource,
     EntityMaterializerSource,
     LoggingOptions,
     UpdateLogger);
Esempio n. 15
0
 public StateManager(
     [NotNull] IInternalEntityEntryFactory factory,
     [NotNull] IEntityKeyFactorySource entityKeyFactorySource,
     [NotNull] IInternalEntityEntrySubscriber subscriber,
     [NotNull] IInternalEntityEntryNotifier notifier,
     [NotNull] IValueGenerationManager valueGeneration,
     [NotNull] IModel model,
     [NotNull] IDataStore dataStore)
 {
     _keyFactorySource = entityKeyFactorySource;
     _factory          = factory;
     _subscriber       = subscriber;
     Notify            = notifier;
     ValueGeneration   = valueGeneration;
     _model            = model;
     _dataStore        = dataStore;
 }
Esempio n. 16
0
 public StateManager(
     [NotNull] IInternalEntityEntryFactory factory,
     [NotNull] IInternalEntityEntrySubscriber subscriber,
     [NotNull] IInternalEntityEntryNotifier notifier,
     [NotNull] IValueGenerationManager valueGeneration,
     [NotNull] IModel model,
     [NotNull] IDatabase database,
     [NotNull] IConcurrencyDetector concurrencyDetector,
     [NotNull] DbContext context)
 {
     _factory             = factory;
     _subscriber          = subscriber;
     Notify               = notifier;
     ValueGeneration      = valueGeneration;
     _model               = model;
     _database            = database;
     _concurrencyDetector = concurrencyDetector;
     Context              = context;
 }
 public InternalEntityEntrySubscriber([NotNull] IInternalEntityEntryNotifier notifier)
 {
     _notifier = notifier;
 }
Esempio n. 18
0
 public InternalEntityEntrySubscriber([NotNull] IInternalEntityEntryNotifier notifier)
 {
     _notifier = notifier;
 }