Skip to content

Commit

Permalink
Fixes #1526 - If provider connection string is specified use it.
Browse files Browse the repository at this point in the history
  • Loading branch information
niemyjski committed Apr 7, 2024
1 parent c148973 commit 92f1121
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 16 deletions.
5 changes: 1 addition & 4 deletions src/Exceptionless.Core/Configuration/MessageBusOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ 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;
if (!String.IsNullOrEmpty(providerConnectionString))
options.Data.AddRange(providerConnectionString.ParseConnectionString());

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

return options;
}
Expand Down
5 changes: 1 addition & 4 deletions src/Exceptionless.Core/Configuration/MetricOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ 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;
if (!String.IsNullOrEmpty(providerConnectionString))
options.Data.AddRange(providerConnectionString.ParseConnectionString());

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

return options;
}
Expand Down
5 changes: 1 addition & 4 deletions src/Exceptionless.Core/Configuration/QueueOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ 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;
if (!String.IsNullOrEmpty(providerConnectionString))
options.Data.AddRange(providerConnectionString.ParseConnectionString());

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

return options;
}
Expand Down
5 changes: 1 addition & 4 deletions src/Exceptionless.Core/Configuration/StorageOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ 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;
if (!String.IsNullOrEmpty(providerConnectionString))
options.Data.AddRange(providerConnectionString.ParseConnectionString());

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

return options;
}
Expand Down

0 comments on commit 92f1121

Please sign in to comment.