public QueryResultsDirectory( CurrentStorage storage ) : base(storage, CreateTableDefinition()) { }
protected QueryParameterDirectoryBase( CurrentStorage storage, TableDefinition tableDefinition ) : base(storage, tableDefinition) { }
public TemplateDirectory( CurrentStorage storage ) : base(storage, CreateTableDefinition()) { }
public QueryGroupParameterDirectory( CurrentStorage storage ) : base(storage, CreateTableDefinition()) { }
public InternalSqliteConnectionDialog(MsSqlAuditorModel model) { this._model = model; this._storage = model.DefaultVaultProcessor.CurrentStorage; this._connectionsManager = new ConnectionsManager(model); this._loginManager = new LoginManager(this._storage); this._templateManager = new TemplateManager(this._storage); this._templates = TemplateNodesLoader.GetTemplates(); InitializeComponent(); List<BindingWrapper<ConnectionType>> connectionTypes = this._model.ConnectionTypes; this.dataTypeBindingSource.DataSource = connectionTypes; this.dataTypeBindingSource.DataMember = "Item"; this.cmbDataType.DataSource = dataTypeBindingSource.DataSource; this.cmbDataType.SelectionChangeCommitted += this.cmbDataType_SelectedIndexChanged; this.cmbConnectionGroup.SelectionChangeCommitted += this.cmbConnectionGroup_SelectedIndexChanged; this.cmbServerInstance.SelectionChangeCommitted += this.cmbServerInstance_SelectedIndexChanged; this.cmbTemplate.SelectionChangeCommitted += this.cmbTemplate_SelectedIndexChanged; this.cmbLogin.SelectionChangeCommitted += this.cmbLogin_SelectedIndexChanged; if (connectionTypes.Count > 0) { UpdateConnectionGroupList(); } UpdateButtonsState(); }
public ServerInstanceDirectory( CurrentStorage storage ) : base(storage, CreateTableDefinition()) { }
public TemplateNodeQueryParameterDirectory( CurrentStorage storage ) : base(storage, CreateTableDefinition()) { }
public ConnectionGroupDirectory( CurrentStorage storage ) : base ( storage, CreateTableDefinition() ) { }
/// <summary> /// Constructor /// </summary> /// <param name="connection"></param> /// <param name="tableDefinition"></param> /// <param name="readOnly">Is table read-only?</param> /// <param name="tableName">Table name</param> protected TableDirectory( CurrentStorage storage, TableDefinition tableDefinition ) : base(storage, tableDefinition) { }
public SqliteInternalQueryConnection( CurrentStorage currentStorage, InstanceInfo instance ) : base(ConnectionFactory.CreateSQLiteConnection(currentStorage.FileName, false)) { this._instance = instance; this._currentScope = currentStorage; }
public SqliteInternalQueryCommand( SQLiteCommand command, CurrentStorage currentScope, InstanceInfo instanceInfo ) : base(command) { this._instanceInfo = instanceInfo; this._currentStorage = currentScope; }
public static ServerProperties Load( InstanceInfo instance, CurrentStorage storage ) { ServerProperties storedProps = storage.ServerInstanceDirectory .GetServerProperties(instance); return storedProps; }
public CreateDirectConnectionDialog(MsSqlAuditorModel model) { this._model = model; this._storage = this._model.DefaultVaultProcessor.CurrentStorage; this._connectionsManager = new ConnectionsManager(model); SetLocale(); InitializeComponent(); InitializeEventHandlers(); InitializeBindings(); }
public static CurrentStorage Create( string fileName, ICryptoService cryptoService, bool readOnly = false ) { CurrentStorage storage = new CurrentStorage(fileName, readOnly) { CryptoService = cryptoService }; storage.CreateTables(); return storage; }
public static QueryDirectories GetInstance(CurrentStorage storage, bool isGroupQuery) { if (isGroupQuery) { return new QueryDirectories( storage.QueryGroupDirectory, storage.QueryGroupParameterDirectory ); } return new QueryDirectories( storage.QueryDirectory, storage.QueryParameterDirectory ); }
public static CurrentStorage Create( string fileName, ICryptoService cryptoService, bool readOnly = false ) { CurrentStorage storage = new CurrentStorage(fileName, readOnly) { CryptoService = cryptoService }; storage.CreateTables(); return(storage); }
public LastConnectionProtocolTable(CurrentStorage storage) : base(storage, CreateTableDefinition()) { }
public UserSettingsManager() { this._currentStorage = Program.Model.DefaultVaultProcessor.CurrentStorage; }
public ServiceInfoTable(CurrentStorage storage) : base(storage, CreateTableDefinition()) { }
public NodeInstanceTable(CurrentStorage storage) : base(storage, CreateTableDefinition()) { this._storage = storage; }
public ServerProperties LoadServerProperties(CurrentStorage storage) { ServerProperties storedProps = ServerProperties.Load(this, storage); if (storedProps != null) { this._serverProperties = storedProps; } return this._serverProperties; }
public MetaResultTable(CurrentStorage storage) : base(storage, CreateTableDefinition()) { this.maxRequestCache = null; this.maxRequestLock = new object(); }
public ScheduleJobProcessor(CurrentStorage storage) { this._storage = storage; }
public ScheduleSettingsTable(CurrentStorage storage) : base(storage, GetTableDefinition()) { }
public LoginManager(CurrentStorage storage) { this._storage = storage; this._cryptoService = storage.CryptoService; }
public SqliteInnerQueryConnection( CurrentStorage currentStorage, SqliteConnectionParameters connectionParameters ) : base( ConnectionFactory.CreateSQLiteConnection(currentStorage.FileName, true) ) { SqliteConnectionParameters.Values paramValues = connectionParameters.Resolve(currentStorage); if (paramValues == null) { const string errorMessage = "Can not resolve SQLite internal connection parameters"; Log.Error(errorMessage); throw new ArgumentException(errorMessage, "connectionParameters"); } this._paramValues = paramValues; }
public Values Resolve(CurrentStorage storage) { string sqlQuery = string.Format( @"SELECT DISTINCT {0}.[{26}] AS {22}, {1}.[{27}] AS {23}, {5}.[{28}] AS {24}, {6}.[{29}] AS {25} FROM {0} JOIN {1} ON {0}.[{26}] = {1}.{7} JOIN {2} ON {1}.[{27}] = {2}.{8} JOIN {3} ON {3}.[{30}] = {2}.{9} JOIN {4} ON {4}.[{31}] = {3}.{10} JOIN {5} ON {5}.[{28}] = {4}.{11} JOIN {6} ON {6}.[{29}] = {1}.{12} WHERE {0}.{13}={14} AND {1}.{15}={16} AND {1}.{17} NOT NULL AND {5}.{18}={19} AND {6}.{20}={21}", ConnectionGroupDirectory.TableName, ServerInstanceDirectory.TableName, QueryDirectory.TableName, TemplateNodeQueryDirectory.TableName, TemplateNodeDirectory.TableName, TemplateDirectory.TableName, LoginDirectory.TableName, ConnectionGroupDirectory.TableName.AsFk(), ServerInstanceDirectory.TableName.AsFk(), TemplateNodeQueryDirectory.TableName.AsFk(), TemplateNodeDirectory.TableName.AsFk(), TemplateDirectory.TableName.AsFk(), LoginDirectory.TableName.AsFk(), ConnectionGroupDirectory.NameFn, Values.FieldGroupId.AsParamName(), ServerInstanceDirectory.ConnectionNameFn, Values.FieldServerId.AsParamName(), ServerInstanceDirectory.DbTypeFn, TemplateDirectory.NameFieldName, Values.FieldTemplateId.AsParamName(), LoginDirectory.LoginFn, Values.FieldLoginId.AsParamName(), Values.FieldGroupId, Values.FieldServerId, Values.FieldTemplateId, Values.FieldLoginId, ConnectionGroupDirectory.TableIdentityField, ServerInstanceDirectory.TableIdentityField, TemplateDirectory.TableIdentityField, LoginDirectory.TableIdentityField, TemplateNodeQueryDirectory.TableIdentityField, TemplateNodeDirectory.TableIdentityField ); SQLiteParameter groupParameter = CreateStringParameter(Values.FieldGroupId.AsParamName(), Group); SQLiteParameter serverParameter = CreateStringParameter(Values.FieldServerId.AsParamName(), Connection); SQLiteParameter templateParameter = CreateStringParameter(Values.FieldTemplateId.AsParamName(), Template); SQLiteParameter loginParameter = CreateStringParameter(Values.FieldLoginId.AsParamName(), Login); using (SQLiteConnection connection = ConnectionFactory.CreateSQLiteConnection(storage.FileName, true)) { connection.Open(); List<Values> result = new List<Values>(); new SqlSelectCommand( connection, sqlQuery, reader => result.Add(Values.FromReader(reader)), groupParameter, serverParameter, templateParameter, loginParameter ) .Execute(100); return result.FirstOrDefault(); } }
protected CurrentStorageTable(CurrentStorage storage, TableDefinition tableDefinition) : base(storage.Connection, tableDefinition) { Storage = storage; }
public ServerProperties InitServerProperties(CurrentStorage storage, int timeout = 0) { if (this._serverProperties == null) { try { this._serverProperties = ServerProperties.Query(this, timeout); storage.ServerInstanceDirectory.GetId(this.ConnectionGroup, this); // Save properties } catch (Exception exc) { log.WarnFormat( "Unable to retrieve instance version from remote server. Instance:'{0}';Authentication:'{1}';Exception:'{2}'", Instance, Authentication, exc ); ServerProperties storedProps = LoadServerProperties(storage); if (storedProps == null) { log.WarnFormat( "Instance version is not available. Instance:'{0}';Authentication:'{1}';Exception:'{2}'", Instance, Authentication, exc ); throw; } } } return this._serverProperties; }
public TemplateManager(CurrentStorage storage) { this._storage = storage; }
public UserSettingsTable( CurrentStorage storage ) : base(storage, CreateTableDefinition()) { }