Skip to content

Commit

Permalink
Revert "Fixes #1526 - If provider connection string is specified use …
Browse files Browse the repository at this point in the history
…it. (#1540)"

This reverts commit 5033f18.
  • Loading branch information
niemyjski committed Apr 7, 2024
1 parent cc28f3d commit 8dc70d7
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
5 changes: 4 additions & 1 deletion src/Exceptionless.Core/Configuration/MessageBusOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ public static MessageBusOptions ReadFromConfiguration(IConfiguration config, App
options.Provider = options.Data.GetString(nameof(options.Provider));

string? providerConnectionString = !String.IsNullOrEmpty(options.Provider) ? config.GetConnectionString(options.Provider) : null;
options.ConnectionString = !String.IsNullOrEmpty(providerConnectionString) ? providerConnectionString : options.Data.BuildConnectionString(new HashSet<string> { nameof(options.Provider) });
if (!String.IsNullOrEmpty(providerConnectionString))
options.Data.AddRange(providerConnectionString.ParseConnectionString());

options.ConnectionString = options.Data.BuildConnectionString(new HashSet<string> { nameof(options.Provider) });

return options;
}
Expand Down
5 changes: 4 additions & 1 deletion src/Exceptionless.Core/Configuration/MetricOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ public static MetricOptions ReadFromConfiguration(IConfiguration config)
options.Provider = options.Data.GetString(nameof(options.Provider));

string? providerConnectionString = !String.IsNullOrEmpty(options.Provider) ? config.GetConnectionString(options.Provider) : null;
options.ConnectionString = !String.IsNullOrEmpty(providerConnectionString) ? providerConnectionString : options.Data.BuildConnectionString(new HashSet<string> { nameof(options.Provider) });
if (!String.IsNullOrEmpty(providerConnectionString))
options.Data.AddRange(providerConnectionString.ParseConnectionString());

options.ConnectionString = options.Data.BuildConnectionString(new HashSet<string> { nameof(options.Provider) });

return options;
}
Expand Down
5 changes: 4 additions & 1 deletion src/Exceptionless.Core/Configuration/QueueOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ public static QueueOptions ReadFromConfiguration(IConfiguration config, AppOptio
options.Provider = options.Data.GetString(nameof(options.Provider));

string? providerConnectionString = !String.IsNullOrEmpty(options.Provider) ? config.GetConnectionString(options.Provider) : null;
options.ConnectionString = !String.IsNullOrEmpty(providerConnectionString) ? providerConnectionString : options.Data.BuildConnectionString(new HashSet<string> { nameof(options.Provider) });
if (!String.IsNullOrEmpty(providerConnectionString))
options.Data.AddRange(providerConnectionString.ParseConnectionString());

options.ConnectionString = options.Data.BuildConnectionString(new HashSet<string> { nameof(options.Provider) });

return options;
}
Expand Down
5 changes: 4 additions & 1 deletion src/Exceptionless.Core/Configuration/StorageOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ public static StorageOptions ReadFromConfiguration(IConfiguration config, AppOpt
options.Provider = options.Data.GetString(nameof(options.Provider));

string? providerConnectionString = !String.IsNullOrEmpty(options.Provider) ? config.GetConnectionString(options.Provider) : null;
options.ConnectionString = !String.IsNullOrEmpty(providerConnectionString) ? providerConnectionString : options.Data.BuildConnectionString(new HashSet<string> { nameof(options.Provider) });
if (!String.IsNullOrEmpty(providerConnectionString))
options.Data.AddRange(providerConnectionString.ParseConnectionString());

options.ConnectionString = options.Data.BuildConnectionString(new HashSet<string> { nameof(options.Provider) });

return options;
}
Expand Down

0 comments on commit 8dc70d7

Please sign in to comment.