diff --git a/.editorconfig b/.editorconfig
index 497bcbbe3..b04c084e4 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -1149,6 +1149,9 @@ dotnet_diagnostic.CA1513.severity = none
# CA1514: Avoid redundant length argument
dotnet_diagnostic.CA1514.severity = none
+# CA1515: Consider making public types internal
+dotnet_diagnostic.CA1515.severity = none
+
# CA1700: Do not name enum values 'Reserved'
dotnet_diagnostic.CA1700.severity = none
# Options: api_surface
@@ -3099,6 +3102,8 @@ dotnet_diagnostic.rcs9010.severity = none
# Specify ExportCodeFixProviderAttribute.Name
dotnet_diagnostic.rcs9011.severity = none
+dotnet_diagnostic.RMG012.severity = error # Unmapped target member
+dotnet_diagnostic.RMG020.severity = error # Unmapped source member
# Refactorings
diff --git a/Conventions.sln b/Conventions.sln
index ce280b9e8..647e54fba 100644
--- a/Conventions.sln
+++ b/Conventions.sln
@@ -172,6 +172,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".build", ".build", "{6DA138
.editorconfig = .build\.editorconfig
EndProjectSection
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Rocket.Surgery.Conventions.Serilog", "src\Conventions.Serilog\Rocket.Surgery.Conventions.Serilog.csproj", "{ECC586BA-211A-4D60-B83B-AF8EA3943ADC}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -620,6 +622,18 @@ Global
{8A70E596-7382-4094-B048-EBA6D9EF2CFF}.Release|x64.Build.0 = Release|Any CPU
{8A70E596-7382-4094-B048-EBA6D9EF2CFF}.Release|x86.ActiveCfg = Release|Any CPU
{8A70E596-7382-4094-B048-EBA6D9EF2CFF}.Release|x86.Build.0 = Release|Any CPU
+ {ECC586BA-211A-4D60-B83B-AF8EA3943ADC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {ECC586BA-211A-4D60-B83B-AF8EA3943ADC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {ECC586BA-211A-4D60-B83B-AF8EA3943ADC}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {ECC586BA-211A-4D60-B83B-AF8EA3943ADC}.Debug|x64.Build.0 = Debug|Any CPU
+ {ECC586BA-211A-4D60-B83B-AF8EA3943ADC}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {ECC586BA-211A-4D60-B83B-AF8EA3943ADC}.Debug|x86.Build.0 = Debug|Any CPU
+ {ECC586BA-211A-4D60-B83B-AF8EA3943ADC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {ECC586BA-211A-4D60-B83B-AF8EA3943ADC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {ECC586BA-211A-4D60-B83B-AF8EA3943ADC}.Release|x64.ActiveCfg = Release|Any CPU
+ {ECC586BA-211A-4D60-B83B-AF8EA3943ADC}.Release|x64.Build.0 = Release|Any CPU
+ {ECC586BA-211A-4D60-B83B-AF8EA3943ADC}.Release|x86.ActiveCfg = Release|Any CPU
+ {ECC586BA-211A-4D60-B83B-AF8EA3943ADC}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -666,6 +680,7 @@ Global
{C996322A-61AD-49DC-997D-C8550CFDC669} = {8FFDF555-DB50-45F9-9A2D-6410F39151C3}
{5A1D2C50-BDC3-4322-B6E2-E1169C4B20A9} = {DF33E0FB-9790-4654-B60F-8AB22E0CC3D1}
{8A70E596-7382-4094-B048-EBA6D9EF2CFF} = {96A0AEB7-ACFA-491C-8FA5-2A1BE4E8B718}
+ {ECC586BA-211A-4D60-B83B-AF8EA3943ADC} = {8FFDF555-DB50-45F9-9A2D-6410F39151C3}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {439897C2-CCBD-44FE-B2DC-A3E4670ADA59}
diff --git a/Directory.Packages.props b/Directory.Packages.props
index b9993d070..b3c1263dd 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -1,102 +1,100 @@
-
-
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/benchmarks/Hosting.Benchmarks/Program.cs b/benchmarks/Hosting.Benchmarks/Program.cs
index a6350d81c..7fda2ff01 100644
--- a/benchmarks/Hosting.Benchmarks/Program.cs
+++ b/benchmarks/Hosting.Benchmarks/Program.cs
@@ -40,7 +40,7 @@ public class Benchmarks
public async Task Default_Hosting()
{
using var host = Host
- .CreateDefaultBuilder(Array.Empty())
+ .CreateDefaultBuilder()
.ConfigureLogging(x => x.ClearProviders())
.Build();
await host.StartAsync().ConfigureAwait(false);
@@ -50,7 +50,7 @@ public async Task Default_Hosting()
[Benchmark(Baseline = true)]
public async Task Default_Hosting_Application()
{
- var builder = Host.CreateApplicationBuilder(Array.Empty());
+ var builder = Host.CreateApplicationBuilder();
builder.Logging.ClearProviders();
var host = builder.Build();
await host.StartAsync().ConfigureAwait(false);
@@ -60,9 +60,9 @@ public async Task Default_Hosting_Application()
[Benchmark]
public async Task Rocket_Surgery_Hosting_Application()
{
- var builder = Host.CreateApplicationBuilder(Array.Empty());
+ var builder = Host.CreateApplicationBuilder();
builder.Logging.ClearProviders();
- var host = await builder.ConfigureRocketSurgery(Imports.Instance);
+ var host = await builder.ConfigureRocketSurgery();
await host.StartAsync().ConfigureAwait(false);
await host.StopAsync().ConfigureAwait(false);
}
@@ -71,7 +71,7 @@ public async Task Rocket_Surgery_Hosting_Application()
public async Task Default_Hosting_With_Service()
{
using var host = Host
- .CreateDefaultBuilder(Array.Empty())
+ .CreateDefaultBuilder()
.ConfigureLogging(x => x.ClearProviders())
.ConfigureServices(x => x.AddHostedService())
.Build();
@@ -82,10 +82,10 @@ public async Task Default_Hosting_With_Service()
[Benchmark]
public async Task Rocket_Surgery_Hosting_Application_With_Service()
{
- var builder = Host.CreateApplicationBuilder(Array.Empty());
+ var builder = Host.CreateApplicationBuilder();
builder.Services.AddHostedService();
builder.Logging.ClearProviders();
- var host = await builder.ConfigureRocketSurgery(Imports.Instance);
+ var host = await builder.ConfigureRocketSurgery();
await host.StartAsync().ConfigureAwait(false);
await host.StopAsync().ConfigureAwait(false);
}
@@ -102,4 +102,4 @@ public Task StopAsync(CancellationToken cancellationToken)
return Task.CompletedTask;
}
}
-}
\ No newline at end of file
+}
diff --git a/sample/Diagnostics/Program.cs b/sample/Diagnostics/Program.cs
index b4f4b56a5..1fc9005fe 100644
--- a/sample/Diagnostics/Program.cs
+++ b/sample/Diagnostics/Program.cs
@@ -21,7 +21,7 @@ public static async Task Main(string[] args)
public static async Task CreateHostBuilder(string[] args)
{
- return await Host.CreateApplicationBuilder(args).LaunchWith(RocketBooster.For(Imports.Instance));
+ return await Host.CreateApplicationBuilder(args).ConfigureRocketSurgery();
}
}
@@ -59,4 +59,4 @@ public override async Task ExecuteAsync(CommandContext context, AppSettings
return 0;
}
-}
\ No newline at end of file
+}
diff --git a/sample/Sample.BlazorWasm/Program.cs b/sample/Sample.BlazorWasm/Program.cs
index ee82322df..90d844440 100644
--- a/sample/Sample.BlazorWasm/Program.cs
+++ b/sample/Sample.BlazorWasm/Program.cs
@@ -11,5 +11,5 @@
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new(builder.HostEnvironment.BaseAddress), });
-var host = await builder.ConfigureRocketSurgery(Imports.Instance);
-await host.RunAsync();
\ No newline at end of file
+var host = await builder.ConfigureRocketSurgery();
+await host.RunAsync();
diff --git a/sample/Sample.Core.Tests/SampleTests.cs b/sample/Sample.Core.Tests/SampleTests.cs
index 3bdf3038c..687043378 100644
--- a/sample/Sample.Core.Tests/SampleTests.cs
+++ b/sample/Sample.Core.Tests/SampleTests.cs
@@ -21,7 +21,7 @@ public async Task Should_Register_Services()
public SampleTests()
{
- _builder = new ConventionContextBuilder(new Dictionary