#region License // Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved. // This source code is made available under the terms of the GNU Lesser General Public License v3.0 // https://github.com/paulkohler/minisqlquery/blob/master/LICENSE #endregion using System; using System.Collections.Specialized; using System.Data.Common; namespace MiniSqlQuery.Core { /// /// An interface for the application settings. /// public interface IApplicationSettings { /// /// Fired when the list of connection definitions is modified. /// /// /// event EventHandler ConnectionDefinitionsChanged; /// /// Fired when the database connection (provider and/or connection string) are modified. /// /// event EventHandler DatabaseConnectionReset; /// /// Gets an instance of depending on the value of . /// /// The connection. DbConnection Connection { get; } /// /// Gets or sets a reference to the current connection definiton class. /// /// The connection definition. DbConnectionDefinition ConnectionDefinition { get; set; } /// /// Gets or sets the date time format for grid item results (e.g. "yyyy-MM-dd HH:mm:ss.fff"). /// /// The date time format. string DateTimeFormat { get; set; } /// /// Gets or sets the default connection definition filename. I blank the default is the users profile area. /// /// The default connection definition filename. string DefaultConnectionDefinitionFilename { get; set; } /// /// Gets the default filter string for dialog boxes. /// /// The default file filter. string DefaultFileFilter { get; } /// /// Gets or sets a value indicating whether to enable query batching using the "GO" keyword. /// /// true if query batching is enabled; otherwise, false. bool EnableQueryBatching { get; set; } /// /// Gets or sets a value indicating the command timeout. /// /// The command timeout. int CommandTimeout { get; set; } /// /// Gets or sets a value indicating whether to include read-only columns in the export SQL. /// /// /// true if including read-only columns in the export; otherwise, false. /// bool IncludeReadOnlyColumnsInExport { get; set; } /// /// Gets or sets a value indicating whether to load plugins or not. /// /// true if [load plugins]; otherwise, false. The default is true. bool LoadExternalPlugins { get; set; } /// /// Gets or sets the null text of a result (e.g. "<NULL>"). /// /// The null text. string NullText { get; set; } /// /// Gets or sets the plug in file filter for finding the external plugins (e.g. "*.plugin.dll"). /// /// The plug in file filter. string PlugInFileFilter { get; set; } /// /// Gets or sets the most recent files. /// /// The most recent files. StringCollection MostRecentFiles { get; set; } /// /// Gets an instance of depending on the value of . /// /// The provider factory. DbProviderFactory ProviderFactory { get; } /// /// Closes the current connection (if any). /// void CloseConnection(); /// /// Gets the current connection definitions for this user. /// /// Connection definitions. DbConnectionDefinitionList GetConnectionDefinitions(); /// /// Helper method to get an open connection. /// /// A object. DbConnection GetOpenConnection(); /// /// Gets, and increments, the "untitled document counter" starting at 1 for the "session". /// /// The untitled document value. /// The get untitled document counter. int GetUntitledDocumentCounter(); /// /// Resets the connection details firing the event. /// /// void ResetConnection(); /// /// Resets the list of connection definitions that are stored in the user profile. /// /// The definition List. void SetConnectionDefinitions(DbConnectionDefinitionList definitionList); } }