public OutputViewer(DocumentPage documentPage) { DocumentPage = documentPage; FileResultViewer = new FileResultViewer(this); InitializeComponent(); _timerExecutionMonitor = new DispatcherTimer(DispatcherPriority.Normal, Dispatcher) { Interval = TimeSpan.FromMilliseconds(100) }; _timerExecutionMonitor.Tick += TimerExecutionMonitorTickHandler; Application.Current.Deactivated += ApplicationDeactivatedHandler; Initialize(); _providerConfiguration = WorkDocumentCollection.GetProviderConfiguration(DocumentPage.CurrentConnection.ProviderName); ConnectionAdapter = DocumentPage.DatabaseModel.CreateConnectionAdapter(); StatementValidator = DocumentPage.InfrastructureFactory.CreateStatementValidator(); ExecutionPlanViewer = DocumentPage.InfrastructureFactory.CreateExecutionPlanViewer(this); TabExecutionPlan.Content = ExecutionPlanViewer.Control; TraceViewer = DocumentPage.InfrastructureFactory.CreateTraceViewer(ConnectionAdapter); TabTrace.Content = TraceViewer.Control; BreakOnExceptions = DocumentPage.WorkDocument.BreakOnExceptions; }
public StatementExecutionHistory(string providerName) { InitializeComponent(); _providerConfiguration = WorkDocumentCollection.GetProviderConfiguration(providerName); _collectionView = CollectionViewSource.GetDefaultView(_historyEntries); _collectionView.SortDescriptions.Add(new SortDescription("ExecutedAt", ListSortDirection.Descending)); }
public static DatabaseProviderConfiguration GetProviderConfiguration(string providerName) { if (!Instance._databaseProviderConfigurations.TryGetValue(providerName, out DatabaseProviderConfiguration configuration)) { configuration = new DatabaseProviderConfiguration(providerName); Instance._databaseProviderConfigurations.Add(providerName, configuration); } return(configuration); }
public OutputViewer(DocumentPage documentPage) { DocumentPage = documentPage; FileResultViewer = new FileResultViewer(this); InitializeComponent(); _timerExecutionMonitor = new DispatcherTimer(DispatcherPriority.Normal, Dispatcher) { Interval = TimeSpan.FromMilliseconds(100) }; _timerExecutionMonitor.Tick += TimerExecutionMonitorTickHandler; Application.Current.Deactivated += ApplicationDeactivatedHandler; Initialize(); _providerConfiguration = WorkDocumentCollection.GetProviderConfiguration(DocumentPage.CurrentConnection.ProviderName); ConnectionAdapter = DocumentPage.DatabaseModel.CreateConnectionAdapter(); StatementValidator = DocumentPage.InfrastructureFactory.CreateStatementValidator(); ExecutionPlanViewer = DocumentPage.InfrastructureFactory.CreateExecutionPlanViewer(this); TabExecutionPlan.Content = ExecutionPlanViewer.Control; TraceViewer = DocumentPage.InfrastructureFactory.CreateTraceViewer(ConnectionAdapter); TabTrace.Content = TraceViewer.Control; BreakOnExceptions = DocumentPage.WorkDocument.BreakOnExceptions; }