public void Loaded(
     DbConfigurationLoadedEventArgs loadedEventArgs,
     DbConfigurationInterceptionContext interceptionContext)
 {
     Assert.Same(_snapshot, loadedEventArgs.DependencyResolver);
     Assert.NotNull(interceptionContext);
     Called++;
 }
Пример #2
0
        public virtual void OnLoaded(InternalConfiguration configuration)
        {
            DbConfigurationLoadedEventArgs configurationLoadedEventArgs = new DbConfigurationLoadedEventArgs(configuration);
            EventHandler <DbConfigurationLoadedEventArgs> loadedHandler = this._loadedHandler;

            if (loadedHandler != null)
            {
                loadedHandler((object)configuration.Owner, configurationLoadedEventArgs);
            }
            configuration.DispatchLoadedInterceptors(configurationLoadedEventArgs);
        }
        public virtual void OnLoaded(InternalConfiguration configuration)
        {
            DebugCheck.NotNull(configuration);

            var eventArgs = new DbConfigurationLoadedEventArgs(configuration);

            var handler = _loadedHandler;

            if (handler != null)
            {
                handler(configuration.Owner, eventArgs);
            }

            configuration.DispatchLoadedInterceptors(eventArgs);
        }
Пример #4
0
        public virtual void OnLoaded(InternalConfiguration configuration)
        {
            DebugCheck.NotNull(configuration);

            var eventArgs = new DbConfigurationLoadedEventArgs(configuration);

            var handler = _loadedHandler;

            if (handler != null)
            {
                handler(configuration.Owner, eventArgs);
            }

            foreach (var handlerFromConfigFile in configuration.OnLoadedHandlers)
            {
                handlerFromConfigFile(configuration.Owner, eventArgs);
            }
        }
 public void Handler(object sender, DbConfigurationLoadedEventArgs args)
 {
     Assert.Same(_configuration.Object.Owner, sender);
     Assert.Same(_snapshot, args.DependencyResolver);
     Called++;
 }
Пример #6
0
 public void DispatchLoadedInterceptors(DbConfigurationLoadedEventArgs loadedEventArgs)
 {
     _dispatchers().Configuration.Loaded(loadedEventArgs, new DbInterceptionContext());
 }
 void DbConfiguration_Loaded(object sender, System.Data.Entity.Infrastructure.DependencyResolution.DbConfigurationLoadedEventArgs e)
 {
     e.AddDependencyResolver(new SingletonDependencyResolver <DbProviderServices>(
                                 SqlProviderServices.Instance, SqlProviderServices.ProviderInvariantName), true);
 }