public FirebirdDescriptor(Config config, string component,
ConnectionInfoDecryptionDelegate decryptionDelegate)
{
FbConnectionStringBuilder builder = new FbConnectionStringBuilder();
Server = config.GetParameter(component, "Server", null);
if (StringHelper.IsNonBlank(Server))
{
builder.DataSource = Server;
}
else
{
builder.ServerType = FbServerType.Embedded;
// For the embedded server, we want to disable pooling so we don't wind up locking
// the file indefinitely.
builder.Pooling = false;
_usePooling = false;
}
builder.Database = Database = config.GetParameterWithSubstitution(component, "Database", true);
builder.UserID = User = config.GetParameter(component, "User", null);
// First make it without a password.
_cleanConnStr = builder.ToString();
// Now with the password for the real one.
Password = GetDecryptedConfigParameter(config, component, "Password", decryptionDelegate);
builder.Password = Password;
_connectionStr = builder.ToString();
}