public void Loaded( DbConfigurationLoadedEventArgs loadedEventArgs, DbConfigurationInterceptionContext interceptionContext) { Assert.Same(_snapshot, loadedEventArgs.DependencyResolver); Assert.NotNull(interceptionContext); Called++; }
public void Loaded(DbConfigurationLoadedEventArgs loadedEventArgs, DbConfigurationInterceptionContext interceptionContext) { var formatterFactory = loadedEventArgs.DependencyResolver .GetService <Func <DbContext, Action <string>, DatabaseLogFormatter> >(); var formatter = formatterFactory(null, (s) => { Debug.WriteLine(s); }); DbInterception.Add(formatter); }
public void Loaded(DbConfigurationLoadedEventArgs loadedEventArgs, DbConfigurationInterceptionContext interceptionContext) { var logger = new ExceptionLogger(); _baseInfoQueue = new InfoQueue <BaseInfo>(); var profiler = new DbProfiler(_baseInfoQueue) { AssembliesToExclude = new SortedSet <string> { typeof(DbProfiler).Assembly.GetName().Name, typeof(DatabaseLogger).Assembly.GetName().Name } }; DbInterception.Add(new DatabaseInterceptor(profiler)); _commandsTransmitter = new CommandsTransmitter( _baseInfoQueue, logger, new SimpleHttp(), _serverUri, LoggerPath.GetLogFileFullPath(_logFilePath)); _commandsTransmitter.Start(); }
public void Loaded( DbConfigurationLoadedEventArgs loadedEventArgs, DbConfigurationInterceptionContext interceptionContext) { TestLoadedInterceptor.HooksRun.Push(_tag); }
public void Loaded( DbConfigurationLoadedEventArgs loadedEventArgs, DbConfigurationInterceptionContext interceptionContext) { loadedEventArgs.AddDependencyResolver(MutableResolver.Instance, overrideConfigFile: true); }
public void Loaded(System.Data.Entity.Infrastructure.DependencyResolution.DbConfigurationLoadedEventArgs loadedEventArgs, DbConfigurationInterceptionContext interceptionContext) { loadedEventArgs.ReplaceService <DbProviderServices>( (s, _) => new EFCachingProviderServices()); }