public void GetLinesArrayFromAFile(out string[] oLinesArray) { var file = UtilsStreamReaders.GetInstance(). ReadStreamFile(this.GetFilePath()); oLinesArray = file.Split(Environment.NewLine); }
public string EncryptFile(KeyPair pKeyPair, string pPath) { return(_oRSAManager. EncryptWithPublicKeyString( UtilsStreamReaders.GetInstance().ReadStreamFile(pPath), pKeyPair.public_string)); }
public string DecryptFile(KeyPair pKeyPair, string pPath) { return(_oRSAManager. DecryptWithPrivateKeyString( UtilsStreamReaders.GetInstance().ReadStreamFile(pPath), pKeyPair)); }
public void DescryptEachPersistentFile(KeyPair pKeyPair, Paths pPaths) { string dataToWritte; foreach (var path in pPaths.oPaths) { dataToWritte = _oRSAManager. DecryptWithPrivateKeyString( UtilsStreamReaders.GetInstance().ReadStreamFile(path), pKeyPair); UtilsStreamWritters.GetInstance().WritteStringToFile(dataToWritte, path); } }
private void SetPaths() { string createTablePaths = string.Empty; string so = UtilsSO.GetInstance().GetSO(); if (so.Contains("unix")) { createTablePaths = @"./DAOs/PathsFiles/insertQueries_Unix_Paths.json"; } else { createTablePaths = @".\DAOs\PathsFiles\insertQueries_Unix_Paths.json"; } var paths = UtilsStreamReaders.GetInstance().ReadStreamFile(createTablePaths); UtilsJSON.GetInstance().DeserializeFromString(out _oPathsArray, paths); }
private void SetProperties() { _connectionProperties = String.Empty; string so = UtilsSO.GetInstance().GetSO(); if (so.Contains("unix")) { _connectionProperties = @"./DAOs/Connection/connectionProperties.json"; } else { _connectionProperties = @".\DAOs\Connection\connectionProperties.json"; } var connectionProp = UtilsStreamReaders.GetInstance().ReadStreamFile(_connectionProperties); UtilsJSON.GetInstance().DeserializeFromString(out _oProperties, connectionProp); }
private void SetPaths() { string createTablePaths; string so = UtilsSO.GetInstance().GetSO(); if (so.Contains("unix")) { createTablePaths = @"./DAOs/CreateTableOperations/createTables_Unix_Paths.json"; } else { createTablePaths = @".\DAOs\CreateTableOperations\createTables_Unix_Paths.json"; } var paths = UtilsStreamReaders.GetInstance().ReadStreamFile(createTablePaths); Paths oPathsArray; UtilsJSON.GetInstance().DeserializeFromString(out oPathsArray, paths); _oPathsArray = oPathsArray.oPaths; }
public void SetQuery(string pPath, out Query pQuery) { string path; switch (pPath) { case "all": path = _oPaths.oPaths[0]; break; case "column": path = _oPaths.oPaths[1]; break; default: path = string.Empty; break; } UtilsJSON.GetInstance().DeserializeFromString( out pQuery, UtilsStreamReaders.GetInstance().ReadStreamFile(path)); }
private void SetPaths() { string createTablePaths = string.Empty; string so = UtilsSO.GetInstance().GetSO(); if (so.Contains("unix")) { createTablePaths = @"./Processes/InitialDataInsertion/insertData_Unix_Paths.json"; } else { createTablePaths = @".\Processes\InitialDataInsertion\insertData_Windows_Paths.json"; } var paths = UtilsStreamReaders.GetInstance().ReadStreamFile(createTablePaths); Paths oPathsArray; UtilsJSON.GetInstance().DeserializeFromString(out oPathsArray, paths); this._INSERT_DATES_QUERY_PATH = oPathsArray.oPaths[UtilsConstants.IntConstants.ZERO]; this._INSERT_GEOZONE_COUNTRIES_QUERY_PATH = oPathsArray.oPaths[UtilsConstants.IntConstants.THREE]; this._INSERT_GEOZONE_NAME_QUERY_PATH = oPathsArray.oPaths[UtilsConstants.IntConstants.ONE]; this._INSERT_GEOZONE_QUERY_PATH = oPathsArray.oPaths[UtilsConstants.IntConstants.TWO]; }
private void SetPaths() { string createTablePaths = string.Empty; string so = UtilsSO.GetInstance().GetSO(); if (so.Contains("unix")) { createTablePaths = @"./DAOs/SelectTableOperations/selectTables_Unix_Paths.json"; } else { createTablePaths = @".\\DAOs\\SelectTableOperations\\selectTables_Windows_Paths.json"; } var paths = UtilsStreamReaders.GetInstance().ReadStreamFile(createTablePaths); Paths oPathsArray; UtilsJSON.GetInstance().DeserializeFromString(out oPathsArray, paths); this._SELECT_FROM_COUNTRIES_QUERY_PATH = oPathsArray.oPaths[UtilsConstants.IntConstants.ZERO]; this._SELECT_FROM_COUNTRIES_ID_QUERY_PATH = oPathsArray.oPaths[UtilsConstants.IntConstants.ONE]; this._SELECT_FROM_GEONAMEDTABLE_QUERY_PATH = oPathsArray.oPaths[UtilsConstants.IntConstants.TWO]; this._SELECT_ID_QUERY_PATH = oPathsArray.oPaths[UtilsConstants.IntConstants.THREE]; this._SELECT_DATES_QUERY_PATH = oPathsArray.oPaths[UtilsConstants.IntConstants.FOUR]; }
public void SetQuery(string pPath, out Query pQuery) { string query = UtilsStreamReaders.GetInstance().ReadStreamFile(pPath); UtilsJSON.GetInstance().DeserializeFromString(out pQuery, query); }