コード例 #1
0
 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);
        }
コード例 #3
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);
            }

            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);
            }
        }
コード例 #5
0
 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());
 }
コード例 #7
0
 void DbConfiguration_Loaded(object sender, System.Data.Entity.Infrastructure.DependencyResolution.DbConfigurationLoadedEventArgs e)
 {
     e.AddDependencyResolver(new SingletonDependencyResolver <DbProviderServices>(
                                 SqlProviderServices.Instance, SqlProviderServices.ProviderInvariantName), true);
 }