Azavea.Open.DAO.PostgreSQL.PostgreSqlDescriptor.PostgreSqlDescriptor C# (CSharp) Method

PostgreSqlDescriptor() public method

This constructor reads all the appropriate values from our standard config file in the normal format.
public PostgreSqlDescriptor ( Config config, string component, ConnectionInfoDecryptionDelegate decryptionDelegate ) : System
config Azavea.Open.Common.Config Config to get params from.
component string Section of the config XML to look in for db params.
decryptionDelegate ConnectionInfoDecryptionDelegate Delegate to call to decrypt password fields. /// May be null if passwords are in plain text.
return System
        public PostgreSqlDescriptor(Config config, string component,
            ConnectionInfoDecryptionDelegate decryptionDelegate)
        {
            _server = config.GetParameter(component, "Server");
            _port = config.GetParameter(component, "Port", _port);
            _databaseName = config.GetParameter(component, "Database");
            _user = config.GetParameter(component, "User", null);
            _password = GetDecryptedConfigParameter(config, component, "Password", decryptionDelegate);
            _encoding = config.GetParameter(component, "Encoding", _encoding);

            _connectionStr = MakeConnectionString(_server, _port, _databaseName, _user, _password, _encoding);
            _cleanConnStr = MakeConnectionString(_server, _port, _databaseName, _user, null, _encoding);
        }

Same methods

PostgreSqlDescriptor::PostgreSqlDescriptor ( string server, string port, string database, string user, string password, string encoding ) : System