Class DbxConnections
Reads/writes the shared dbxconnections.ini used by both the Delphi and
the .Net designers to store connection definitions. For HTTP Agent connections
it keeps the sensitive data (API key, selected Hub database) here instead of in
the report, exactly like Delphi. Path resolution and section/key names are kept
compatible with Delphi (see Reportman.Reporting.DatabaseInfo dbx config reader).
Inherited Members
Namespace: Reportman.Designer
Assembly: Reportman.Designer.dll
Syntax
public static class DbxConnections
Fields
View SourceAGENT_DRIVER_NAME
Driver name written for agent connections (same literal Delphi uses).
Declaration
public const string AGENT_DRIVER_NAME = "Reportman AI Agent"
Field Value
| Type | Description |
|---|---|
| string |
OverridePath
Test-only override of the file path (used by the wizard self-test so the shared file is not touched).
Declaration
public static string OverridePath
Field Value
| Type | Description |
|---|---|
| string |
Methods
View SourceCandidates()
Candidate paths in the same order as DatabaseInfo's dbx config reader.
Declaration
public static IEnumerable<string> Candidates()
Returns
| Type | Description |
|---|---|
| IEnumerable<string> |
GetConnectionNames()
All connection (section) names in the file.
Declaration
public static List<string> GetConnectionNames()
Returns
| Type | Description |
|---|---|
| List<string> |
GetPath()
Path shown to the user (existing or the one that would be created).
Declaration
public static string GetPath()
Returns
| Type | Description |
|---|---|
| string |
IsAgentConnection(string)
True if the section's DriverName is a Reportman agent driver.
Declaration
public static bool IsAgentConnection(string alias)
Parameters
| Type | Name | Description |
|---|---|---|
| string | alias |
Returns
| Type | Description |
|---|---|
| bool |
ReadAgent(string, out string, out long, out string)
Read the HTTP Agent parameters stored for a connection alias.
Declaration
public static void ReadAgent(string alias, out string apiKey, out long hubDatabaseId, out string baseUrl)
Parameters
| Type | Name | Description |
|---|---|---|
| string | alias | |
| string | apiKey | |
| long | hubDatabaseId | |
| string | baseUrl |
ResolveExistingPath()
First existing dbxconnections.ini, or "" if none exists yet.
Declaration
public static string ResolveExistingPath()
Returns
| Type | Description |
|---|---|
| string |
ResolveWritePath()
Path to write to: the existing file if any, otherwise the preferred default.
Declaration
public static string ResolveWritePath()
Returns
| Type | Description |
|---|---|
| string |
WriteAgent(string, string, long, string)
Write/update the HTTP Agent parameters for a connection alias, preserving all other sections and lines (so a shared Delphi/.Net file stays intact).
Declaration
public static void WriteAgent(string alias, string apiKey, long hubDatabaseId, string baseUrl)
Parameters
| Type | Name | Description |
|---|---|---|
| string | alias | |
| string | apiKey | |
| long | hubDatabaseId | |
| string | baseUrl |