Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API review of Steeltoe.Configuration #1008

Merged
merged 51 commits into from
Sep 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
dc366bb
Add baseline from PublicApiAnalyzer
bart-vmware Aug 22, 2022
6d3825a
Rename IApplicationInstanceInfo.ApplicationNameInContext to GetApplic…
bart-vmware Aug 25, 2022
d34239b
Rename MySqlServiceOption to MySqlServicesOptions
bart-vmware Aug 25, 2022
bfaeeed
Make JsonStreamConfigurationSource take a Stream instead of MemoryStr…
bart-vmware Aug 25, 2022
d519ce9
Rename Ip to IP
bart-vmware Aug 25, 2022
d20f8ed
Seal types in test projects
bart-vmware Aug 25, 2022
e240aaa
Change protected field into property
bart-vmware Aug 25, 2022
eeaf60c
Removed IServicesInfo (never used)
bart-vmware Aug 25, 2022
2f3c26f
Rename ReloadMethods (not a flags-enum, so singular)
bart-vmware Aug 26, 2022
4c31e4d
Review Credential
bart-vmware Aug 26, 2022
b810ace
Review CredentialConverter
bart-vmware Aug 25, 2022
399489d
Review AbstractOptions type hierarchy
bart-vmware Aug 26, 2022
ca8b397
Review Configuration.Placeholder
bart-vmware Aug 26, 2022
c8e76ce
Review Configuration.RandomValue
bart-vmware Aug 26, 2022
5819bc9
Review Configuration.SpringBoot
bart-vmware Aug 26, 2022
3844630
Review Configuration.ConfigServer
bart-vmware Aug 29, 2022
bcd1f40
Review Configuration.Kubernetes
bart-vmware Sep 1, 2022
c7b3bf0
Review Configuration.CloudFoundry
bart-vmware Sep 1, 2022
b9f6dfd
Additional related renames
bart-vmware Sep 1, 2022
4d63330
Update PublicApiAnalyzer
bart-vmware Sep 1, 2022
0353646
Fix broken tests
bart-vmware Sep 1, 2022
adb328c
Remove logic that is conditional to the full .NET Framework
bart-vmware Sep 1, 2022
6a9bcef
Removed unneeded RootNamespace in Configuration.* project files
bart-vmware Sep 1, 2022
41f0462
Cleanup Configuration.* project files
bart-vmware Sep 1, 2022
b17cf20
Activate scoped SA1401: Fields should be private
bart-vmware Sep 2, 2022
0719378
Activate scoped S1168: Empty arrays and collections should be returne…
bart-vmware Sep 2, 2022
bb12450
Activate scoped S2360: Optional parameters should not be used
bart-vmware Sep 2, 2022
fa5db4c
Activate scoped S3872: Parameter names should not duplicate the names…
bart-vmware Sep 2, 2022
3201ed8
Activate scoped S3874: "out" and "ref" parameters should not be used
bart-vmware Sep 2, 2022
493a2c7
Activate scoped S3956: "Generic.List" instances should not be part of…
bart-vmware Sep 2, 2022
9634a92
Activate scoped S4023: Interfaces should not be empty
bart-vmware Sep 2, 2022
c893df9
Activate scoped S4059: Property names should not match get methods
bart-vmware Sep 2, 2022
b0be712
Activate scoped S4487: Unread "private" fields should be removed
bart-vmware Sep 2, 2022
a94e679
Activate scoped S3898: Value types should implement "IEquatable<T>"
bart-vmware Sep 2, 2022
a87b1f6
Activate scoped S4004: Collection properties should be readonly
bart-vmware Sep 2, 2022
1a24e42
Activate scoped S3900: Arguments of public methods should be validate…
bart-vmware Sep 2, 2022
2b6e761
Address review feedback
bart-vmware Sep 19, 2022
1716766
More review feedback
bart-vmware Sep 20, 2022
c4fdde8
Merge branch 'main' into configuration-api-review
bart-vmware Sep 22, 2022
e5ea1f1
Merge branch 'main' into configuration-api-review
bart-vmware Sep 23, 2022
4921bc7
Post-merge fixes
bart-vmware Sep 23, 2022
f47da68
Merge branch 'main' into configuration-api-review
bart-vmware Sep 28, 2022
6d7d73b
Drop 'Extensions' from the Configuration namespace
bart-vmware Sep 28, 2022
36ca368
Make types internal in Configuration.SpringBoot
bart-vmware Sep 28, 2022
0e57acd
Make types internal in Configuration.RandomValue
bart-vmware Sep 28, 2022
c9f65b0
Make types internal in Configuration.Placeholder
bart-vmware Sep 28, 2022
0a52e0a
Make types internal in Configuration.Kubernetes
bart-vmware Sep 28, 2022
6b77a20
Make types internal in Configuration.ConfigServer
bart-vmware Sep 28, 2022
bc6169c
Make types internal in Configuration.CloudFoundry
bart-vmware Sep 28, 2022
4190cb3
Replace Abstract prefix with Base
bart-vmware Sep 28, 2022
c0acd1f
Clarify documentation on SpringBootCommandLineProvider
bart-vmware Sep 28, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 11 additions & 5 deletions Steeltoe.Debug.ruleset
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Steeltoe Debug" Description="Code quality rules for Steeltoe debug builds" ToolsVersion="17.0">
<Rules AnalyzerId="SonarAnalyzer.CSharp" RuleNamespace="SonarAnalyzer.CSharp">
<Rule Id="S100" Action="Warning" />
Expand All @@ -7,10 +7,9 @@
<Rule Id="S1075" Action="None" />
<Rule Id="S108" Action="Info" />
<Rule Id="S110" Action="Warning" />
<Rule Id="S1104" Action="Info" />
<Rule Id="S1104" Action="None" />
<Rule Id="S1135" Action="Info" />
<Rule Id="S1151" Action="Warning" />
<Rule Id="S1168" Action="Info" />
<Rule Id="S1172" Action="Info" />
<Rule Id="S1185" Action="Info" />
<Rule Id="S1186" Action="None" />
Expand All @@ -29,6 +28,7 @@
<Rule Id="S2187" Action="None" />
<Rule Id="S2327" Action="Warning" />
<Rule Id="S2342" Action="Warning" />
<Rule Id="S2360" Action="Warning" />
<Rule Id="S2387" Action="Warning" />
<Rule Id="S2437" Action="Warning" />
<Rule Id="S2583" Action="Info" />
Expand All @@ -46,19 +46,26 @@
<Rule Id="S3597" Action="None" />
<Rule Id="S3598" Action="None" />
<Rule Id="S3776" Action="Info" />
<Rule Id="S3872" Action="Warning" />
<Rule Id="S3874" Action="Warning" />
<Rule Id="S3884" Action="None" />
<Rule Id="S3889" Action="None" />
<Rule Id="S3898" Action="Warning" />
<Rule Id="S3906" Action="Warning" />
<Rule Id="S3908" Action="Warning" />
<Rule Id="S3925" Action="None" />
<Rule Id="S3926" Action="None" />
<Rule Id="S3927" Action="None" />
<Rule Id="S3937" Action="Warning" />
<Rule Id="S3956" Action="Warning" />
<Rule Id="S3962" Action="Warning" />
<Rule Id="S3993" Action="Warning" />
<Rule Id="S3998" Action="None" />
<Rule Id="S4004" Action="Warning" />
<Rule Id="S4022" Action="Warning" />
<Rule Id="S4023" Action="Warning" />
<Rule Id="S4039" Action="Warning" />
<Rule Id="S4059" Action="Warning" />
<Rule Id="S4060" Action="Warning" />
<Rule Id="S4061" Action="None" />
<Rule Id="S4159" Action="None" />
Expand Down Expand Up @@ -150,7 +157,6 @@
<Rule Id="SA1217" Action="Info" />
<Rule Id="SA1309" Action="None" />
<Rule Id="SA1400" Action="None" />
<Rule Id="SA1401" Action="None" />
<Rule Id="SA1402" Action="None" />
<Rule Id="SA1407" Action="None" />
<Rule Id="SA1408" Action="None" />
Expand Down Expand Up @@ -186,4 +192,4 @@
<Rule Id="SA1649" Action="None" />
<Rule Id="SX1309" Action="Warning" />
</Rules>
</RuleSet>
</RuleSet>
17 changes: 12 additions & 5 deletions Steeltoe.Release.ruleset
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Steeltoe Release" Description="Code quality rules for Steeltoe release builds" ToolsVersion="17.0">
<Rules AnalyzerId="SonarAnalyzer.CSharp" RuleNamespace="SonarAnalyzer.CSharp">
<Rule Id="S100" Action="Warning" />
Expand All @@ -9,7 +9,6 @@
<Rule Id="S1135" Action="None" />
<Rule Id="S1144" Action="Warning" />
<Rule Id="S1151" Action="Warning" />
<Rule Id="S1168" Action="None" />
<Rule Id="S1186" Action="None" />
<Rule Id="S1244" Action="Warning" />
<Rule Id="S125" Action="None" />
Expand All @@ -24,6 +23,7 @@
<Rule Id="S2187" Action="None" />
<Rule Id="S2327" Action="Warning" />
<Rule Id="S2342" Action="Warning" />
<Rule Id="S2360" Action="Warning" />
<Rule Id="S2387" Action="Warning" />
<Rule Id="S2437" Action="Warning" />
<Rule Id="S2674" Action="Warning" />
Expand All @@ -34,19 +34,27 @@
<Rule Id="S3433" Action="None" />
<Rule Id="S3597" Action="None" />
<Rule Id="S3598" Action="None" />
<Rule Id="S3872" Action="Warning" />
<Rule Id="S3874" Action="Warning" />
<Rule Id="S3884" Action="None" />
<Rule Id="S3889" Action="None" />
<Rule Id="S3898" Action="Warning" />
<Rule Id="S3900" Action="Warning" />
<Rule Id="S3906" Action="Warning" />
<Rule Id="S3908" Action="Warning" />
<Rule Id="S3925" Action="None" />
<Rule Id="S3926" Action="None" />
<Rule Id="S3927" Action="None" />
<Rule Id="S3937" Action="Warning" />
<Rule Id="S3956" Action="Warning" />
<Rule Id="S3962" Action="Warning" />
<Rule Id="S3993" Action="Warning" />
<Rule Id="S3998" Action="None" />
<Rule Id="S4004" Action="Warning" />
<Rule Id="S4022" Action="Warning" />
<Rule Id="S4023" Action="Warning" />
<Rule Id="S4039" Action="Warning" />
<Rule Id="S4059" Action="Warning" />
<Rule Id="S4060" Action="Warning" />
<Rule Id="S4061" Action="None" />
<Rule Id="S4159" Action="None" />
Expand All @@ -58,7 +66,7 @@
<Rule Id="S4277" Action="None" />
<Rule Id="S4428" Action="None" />
<Rule Id="S4433" Action="None" />
<Rule Id="S4487" Action="None" />
<Rule Id="S4487" Action="Warning" />
<Rule Id="S4583" Action="None" />
<Rule Id="S5773" Action="None" />
<Rule Id="S881" Action="Warning" />
Expand Down Expand Up @@ -133,7 +141,6 @@
<Rule Id="SA1214" Action="None" />
<Rule Id="SA1309" Action="None" />
<Rule Id="SA1400" Action="None" />
<Rule Id="SA1401" Action="None" />
<Rule Id="SA1402" Action="None" />
<Rule Id="SA1407" Action="None" />
<Rule Id="SA1408" Action="None" />
Expand Down Expand Up @@ -165,4 +172,4 @@
<Rule Id="SA1649" Action="None" />
<Rule Id="SX1309" Action="Warning" />
</Rules>
</RuleSet>
</RuleSet>
10 changes: 10 additions & 0 deletions shared-package.props
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,14 @@
<Target Name="ValidatePackage" AfterTargets="BeforeBuild">
<Error Text="The 'Description' property must be set for packable project '$(MSBuildProjectName)'." Condition="'$(Description)' == ''" />
</Target>

<ItemGroup Condition="$(MSBuildProjectName.StartsWith('Steeltoe.Configuration'))">
<!-- Widen the condition above as we're completing more public API reviews -->
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="$(PublicApiAnalyzersVersion)" PrivateAssets="All" />
</ItemGroup>

<PropertyGroup Condition="!$(MSBuildProjectName.StartsWith('Steeltoe.Configuration'))">
<!-- Narrow the condition above as we're completing more public API reviews -->
<NoWarn>$(NoWarn);SA1401;S1168;S2360;S3872;S3874;S3898;S3956;S4004;S4023;S4059;S4487;S3900</NoWarn>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion shared-project.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<NoWarn>$(NoWarn);SA0001</NoWarn>
<NoWarn>$(NoWarn);SA0001;S3900</NoWarn>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand Down
24 changes: 10 additions & 14 deletions src/Bootstrap/src/AutoConfiguration/HostBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using Steeltoe.Common;
using Steeltoe.Configuration.CloudFoundry;
using Steeltoe.Configuration.ConfigServer;
using Steeltoe.Configuration.Kubernetes;
using Steeltoe.Configuration.Placeholder;
using Steeltoe.Configuration.RandomValue;
using Steeltoe.Connector;
using Steeltoe.Connector.MongoDb;
using Steeltoe.Connector.MySql;
Expand All @@ -18,11 +23,6 @@
using Steeltoe.Connector.Redis;
using Steeltoe.Connector.SqlServer;
using Steeltoe.Discovery.Client;
using Steeltoe.Extensions.Configuration.CloudFoundry;
using Steeltoe.Extensions.Configuration.ConfigServer;
using Steeltoe.Extensions.Configuration.Kubernetes;
using Steeltoe.Extensions.Configuration.Placeholder;
using Steeltoe.Extensions.Configuration.RandomValue;
using Steeltoe.Extensions.Logging.DynamicSerilog;
using Steeltoe.Management.Endpoint;
using Steeltoe.Management.Endpoint.Metrics;
Expand Down Expand Up @@ -60,8 +60,8 @@ static HostBuilderExtensions()
public static IHostBuilder AddSteeltoe(this IHostBuilder hostBuilder, IEnumerable<string> exclusions = null, ILoggerFactory loggerFactory = null)
{
AssemblyExtensions.ExcludedAssemblies = exclusions ?? new List<string>();
_loggerFactory = loggerFactory;
ILogger logger = loggerFactory?.CreateLogger(LoggerName) ?? NullLogger.Instance;
_loggerFactory = loggerFactory ?? NullLoggerFactory.Instance;
ILogger logger = _loggerFactory.CreateLogger(LoggerName);
hostBuilder.Properties[LoggerName] = logger;

if (!hostBuilder.WireIfLoaded(WireConfigServer, SteeltoeAssemblies.SteeltoeExtensionsConfigurationConfigServer))
Expand Down Expand Up @@ -126,22 +126,18 @@ private static bool WireIfLoaded(this IHostBuilder hostBuilder, Action<IHostBuil
return false;
}

private static bool WireIfAnyLoaded(this IHostBuilder hostBuilder, Action<IHostBuilder> action, params string[] assembly)
private static void WireIfAnyLoaded(this IHostBuilder hostBuilder, Action<IHostBuilder> action, params string[] assembly)
{
if (assembly.Any(AssemblyExtensions.IsAssemblyLoaded))
{
action(hostBuilder);
return true;
}

return false;
}

private static IHostBuilder Log(this IHostBuilder host, string message)
private static void Log(this IHostBuilder host, string message)
{
var logger = (ILogger)host.Properties[LoggerName];
logger.LogInformation(message);
return host;
}

[MethodImpl(MethodImplOptions.NoInlining)]
Expand All @@ -160,7 +156,7 @@ private static void WireCloudFoundryConfiguration(this IHostBuilder hostBuilder)
[MethodImpl(MethodImplOptions.NoInlining)]
private static void WireKubernetesConfiguration(this IHostBuilder hostBuilder)
{
hostBuilder.ConfigureAppConfiguration(cfg => cfg.AddKubernetes(loggerFactory: _loggerFactory))
hostBuilder.ConfigureAppConfiguration(cfg => cfg.AddKubernetes(_loggerFactory))
.ConfigureServices(serviceCollection => serviceCollection.AddKubernetesConfigurationServices()).Log(LogMessages.WireKubernetesConfiguration);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@

<ItemGroup>
<ProjectReference Include="..\..\..\Common\src\Common\Steeltoe.Common.csproj" />
<ProjectReference Include="..\..\..\Configuration\src\CloudFoundry\Steeltoe.Extensions.Configuration.CloudFoundry.csproj" PrivateAssets="All" />
<ProjectReference Include="..\..\..\Configuration\src\ConfigServer\Steeltoe.Extensions.Configuration.ConfigServer.csproj" PrivateAssets="All" />
<ProjectReference Include="..\..\..\Configuration\src\Kubernetes\Steeltoe.Extensions.Configuration.Kubernetes.csproj" PrivateAssets="All" />
<ProjectReference Include="..\..\..\Configuration\src\RandomValue\Steeltoe.Extensions.Configuration.RandomValue.csproj" PrivateAssets="All" />
<ProjectReference Include="..\..\..\Configuration\src\Placeholder\Steeltoe.Extensions.Configuration.Placeholder.csproj" PrivateAssets="All" />
<ProjectReference Include="..\..\..\Configuration\src\CloudFoundry\Steeltoe.Configuration.CloudFoundry.csproj" PrivateAssets="All" />
<ProjectReference Include="..\..\..\Configuration\src\ConfigServer\Steeltoe.Configuration.ConfigServer.csproj" PrivateAssets="All" />
<ProjectReference Include="..\..\..\Configuration\src\Kubernetes\Steeltoe.Configuration.Kubernetes.csproj" PrivateAssets="All" />
<ProjectReference Include="..\..\..\Configuration\src\RandomValue\Steeltoe.Configuration.RandomValue.csproj" PrivateAssets="All" />
<ProjectReference Include="..\..\..\Configuration\src\Placeholder\Steeltoe.Configuration.Placeholder.csproj" PrivateAssets="All" />
<ProjectReference Include="..\..\..\Connectors\src\EntityFramework6\Steeltoe.Connector.EntityFramework6.csproj" PrivateAssets="All" />
<ProjectReference Include="..\..\..\Connectors\src\Connector\Steeltoe.Connector.csproj" PrivateAssets="All" />
<ProjectReference Include="..\..\..\Discovery\src\Client\Steeltoe.Discovery.Client.csproj" PrivateAssets="All" />
Expand Down
10 changes: 5 additions & 5 deletions src/Bootstrap/src/AutoConfiguration/SteeltoeAssemblies.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ namespace Steeltoe.Bootstrap.AutoConfiguration;

public static class SteeltoeAssemblies
{
public const string SteeltoeExtensionsConfigurationCloudFoundry = "Steeltoe.Extensions.Configuration.CloudFoundry";
public const string SteeltoeExtensionsConfigurationConfigServer = "Steeltoe.Extensions.Configuration.ConfigServer";
public const string SteeltoeExtensionsConfigurationKubernetes = "Steeltoe.Extensions.Configuration.Kubernetes";
public const string SteeltoeExtensionsConfigurationRandomValue = "Steeltoe.Extensions.Configuration.RandomValue";
public const string SteeltoeExtensionsConfigurationPlaceholder = "Steeltoe.Extensions.Configuration.Placeholder";
public const string SteeltoeExtensionsConfigurationCloudFoundry = "Steeltoe.Configuration.CloudFoundry";
public const string SteeltoeExtensionsConfigurationConfigServer = "Steeltoe.Configuration.ConfigServer";
public const string SteeltoeExtensionsConfigurationKubernetes = "Steeltoe.Configuration.Kubernetes";
public const string SteeltoeExtensionsConfigurationRandomValue = "Steeltoe.Configuration.RandomValue";
public const string SteeltoeExtensionsConfigurationPlaceholder = "Steeltoe.Configuration.Placeholder";
public const string SteeltoeConnector = "Steeltoe.Connector";
public const string SteeltoeDiscoveryClient = "Steeltoe.Discovery.Client";
public const string SteeltoeExtensionsLoggingDynamicSerilog = "Steeltoe.Extensions.Logging.DynamicSerilog";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using Steeltoe.Common;
using Steeltoe.Configuration.CloudFoundry;
using Steeltoe.Configuration.ConfigServer;
using Steeltoe.Configuration.Kubernetes;
using Steeltoe.Configuration.Placeholder;
using Steeltoe.Configuration.RandomValue;
using Steeltoe.Connector;
using Steeltoe.Connector.MongoDb;
using Steeltoe.Connector.MySql;
Expand All @@ -17,11 +22,6 @@
using Steeltoe.Connector.Redis;
using Steeltoe.Connector.SqlServer;
using Steeltoe.Discovery.Client;
using Steeltoe.Extensions.Configuration.CloudFoundry;
using Steeltoe.Extensions.Configuration.ConfigServer;
using Steeltoe.Extensions.Configuration.Kubernetes;
using Steeltoe.Extensions.Configuration.Placeholder;
using Steeltoe.Extensions.Configuration.RandomValue;
using Steeltoe.Extensions.Logging.DynamicSerilog;
using Steeltoe.Management.Endpoint;
using Steeltoe.Management.Kubernetes;
Expand Down Expand Up @@ -60,8 +60,8 @@ public static WebApplicationBuilder AddSteeltoe(this WebApplicationBuilder webAp
ILoggerFactory loggerFactory = null)
{
AssemblyExtensions.ExcludedAssemblies = exclusions ?? new List<string>();
_loggerFactory = loggerFactory;
_logger = loggerFactory?.CreateLogger(LoggerName) ?? NullLogger.Instance;
_loggerFactory = loggerFactory ?? NullLoggerFactory.Instance;
_logger = _loggerFactory.CreateLogger(LoggerName);

if (!webApplicationBuilder.WireIfLoaded(WireConfigServer, SteeltoeAssemblies.SteeltoeExtensionsConfigurationConfigServer))
{
Expand Down Expand Up @@ -162,7 +162,7 @@ private static void WireCloudFoundryConfiguration(this WebApplicationBuilder web
[MethodImpl(MethodImplOptions.NoInlining)]
private static void WireKubernetesConfiguration(this WebApplicationBuilder webApplicationBuilder)
{
webApplicationBuilder.Configuration.AddKubernetes(loggerFactory: _loggerFactory);
webApplicationBuilder.Configuration.AddKubernetes(_loggerFactory);
webApplicationBuilder.Services.AddKubernetesConfigurationServices();
Log(LogMessages.WireKubernetesConfiguration);
}
Expand Down
16 changes: 8 additions & 8 deletions src/Bootstrap/src/AutoConfiguration/WebHostBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using Steeltoe.Common;
using Steeltoe.Configuration.CloudFoundry;
using Steeltoe.Configuration.ConfigServer;
using Steeltoe.Configuration.Kubernetes;
using Steeltoe.Configuration.Placeholder;
using Steeltoe.Configuration.RandomValue;
using Steeltoe.Connector;
using Steeltoe.Connector.MongoDb;
using Steeltoe.Connector.MySql;
Expand All @@ -18,11 +23,6 @@
using Steeltoe.Connector.Redis;
using Steeltoe.Connector.SqlServer;
using Steeltoe.Discovery.Client;
using Steeltoe.Extensions.Configuration.CloudFoundry;
using Steeltoe.Extensions.Configuration.ConfigServer;
using Steeltoe.Extensions.Configuration.Kubernetes;
using Steeltoe.Extensions.Configuration.Placeholder;
using Steeltoe.Extensions.Configuration.RandomValue;
using Steeltoe.Extensions.Logging.DynamicSerilog;
using Steeltoe.Management.Endpoint;
using Steeltoe.Management.Endpoint.Metrics;
Expand Down Expand Up @@ -61,8 +61,8 @@ static WebHostBuilderExtensions()
public static IWebHostBuilder AddSteeltoe(this IWebHostBuilder hostBuilder, IEnumerable<string> exclusions = null, ILoggerFactory loggerFactory = null)
{
AssemblyExtensions.ExcludedAssemblies = exclusions ?? new List<string>();
_loggerFactory = loggerFactory;
_logger = loggerFactory?.CreateLogger(LoggerName) ?? NullLogger.Instance;
_loggerFactory = loggerFactory ?? NullLoggerFactory.Instance;
_logger = _loggerFactory.CreateLogger(LoggerName);

if (!hostBuilder.WireIfLoaded(WireConfigServer, SteeltoeAssemblies.SteeltoeExtensionsConfigurationConfigServer))
{
Expand Down Expand Up @@ -159,7 +159,7 @@ private static void WireCloudFoundryConfiguration(this IWebHostBuilder hostBuild
[MethodImpl(MethodImplOptions.NoInlining)]
private static void WireKubernetesConfiguration(this IWebHostBuilder hostBuilder)
{
hostBuilder.ConfigureAppConfiguration(cfg => cfg.AddKubernetes(loggerFactory: _loggerFactory))
hostBuilder.ConfigureAppConfiguration(cfg => cfg.AddKubernetes(_loggerFactory))
.ConfigureServices(serviceCollection => serviceCollection.AddKubernetesConfigurationServices()).Log(LogMessages.WireKubernetesConfiguration);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
using StackExchange.Redis;
using Steeltoe.Common.Options;
using Steeltoe.Common.Security;
using Steeltoe.Configuration.CloudFoundry;
using Steeltoe.Configuration.ConfigServer;
using Steeltoe.Configuration.Kubernetes;
using Steeltoe.Configuration.Placeholder;
using Steeltoe.Configuration.RandomValue;
using Steeltoe.Connector;
using Steeltoe.Discovery;
using Steeltoe.Discovery.Eureka;
using Steeltoe.Extensions.Configuration.CloudFoundry;
using Steeltoe.Extensions.Configuration.ConfigServer;
using Steeltoe.Extensions.Configuration.Kubernetes;
using Steeltoe.Extensions.Configuration.Placeholder;
using Steeltoe.Extensions.Configuration.RandomValue;
using Steeltoe.Extensions.Logging;
using Steeltoe.Extensions.Logging.DynamicSerilog;
using Steeltoe.Management.Endpoint;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
<Import Project="..\..\..\..\shared.props" />

<ItemGroup>
<ProjectReference Include="..\..\..\Configuration\src\ConfigServer\Steeltoe.Extensions.Configuration.ConfigServer.csproj" />
<ProjectReference Include="..\..\..\Configuration\src\Kubernetes\Steeltoe.Extensions.Configuration.Kubernetes.csproj" />
<ProjectReference Include="..\..\..\Configuration\src\RandomValue\Steeltoe.Extensions.Configuration.RandomValue.csproj" />
<ProjectReference Include="..\..\..\Configuration\src\ConfigServer\Steeltoe.Configuration.ConfigServer.csproj" />
<ProjectReference Include="..\..\..\Configuration\src\Kubernetes\Steeltoe.Configuration.Kubernetes.csproj" />
<ProjectReference Include="..\..\..\Configuration\src\RandomValue\Steeltoe.Configuration.RandomValue.csproj" />
<ProjectReference Include="..\..\..\Discovery\src\Client\Steeltoe.Discovery.Client.csproj" />
<ProjectReference Include="..\..\..\Discovery\src\Eureka\Steeltoe.Discovery.Eureka.csproj" />
<ProjectReference Include="..\..\..\Logging\src\DynamicSerilog\Steeltoe.Extensions.Logging.DynamicSerilog.csproj" />
Expand Down
Loading