Skip to content

Commit 9783a38

Browse files
reword comments
1 parent 631e7f9 commit 9783a38

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/ServiceControl.Audit.Persistence.RavenDB/MemoryInformationRetriever.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ namespace ServiceControl.Audit.Persistence.RavenDB;
88

99
class MemoryInformationRetriever(DatabaseConfiguration databaseConfiguration)
1010
{
11-
// TODO what does a connection string look like? Is it only a URI or could it contain other stuff?
12-
// The ?? operator is needed because ServerUrl is populated when running embedded and connection string when running in external mode.
13-
// However the tricky part is that when tests are run they behave like if it was external mode
11+
// What does a connection string look like? Is it only a URI or could it contain other stuff?
12+
// The ?? operator is needed because ServerUrl is populated when running embedded and connection
13+
// string when running in external mode. However, the tricky part is that when tests are run they
14+
// behave like if it was external mode. If the connection string contain always only the server
15+
// URL, this code is safe, otherwise it need to be adjusted to extract the server URL.
1416
readonly HttpClient client = new() { BaseAddress = new Uri(databaseConfiguration.ServerConfiguration.ServerUrl ?? databaseConfiguration.ServerConfiguration.ConnectionString) };
1517

1618
record ResponseDto

src/ServiceControl.Persistence.RavenDB/MemoryInformationRetriever.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ namespace ServiceControl.Persistence.RavenDB;
88

99
class MemoryInformationRetriever(RavenPersisterSettings persisterSettings)
1010
{
11-
// TODO what does a connection string look like? Is it only a URI or could it contain other stuff?
11+
// What does a connection string look like? Is it only a URI or could it contain other stuff?
12+
// The primary instance has only the concept of a connection string (vs the Audit instance having
13+
// both a ServiceUrl and a ConnectionString). If the connection string contain always only the
14+
// server URL, this code is safe, otherwise it need to be adjusted to extract the server URL.
1215
readonly HttpClient client = new() { BaseAddress = new Uri(persisterSettings.ConnectionString) };
1316

1417
record ResponseDto

0 commit comments

Comments
 (0)