-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #51 from autofac/feature/autofac-8
Update to Autofac 8; add .NET 8 support; drop .NET 3.1
- Loading branch information
Showing
37 changed files
with
289 additions
and
346 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -170,5 +170,5 @@ $RECYCLE.BIN/ | |
# Mac crap | ||
.DS_Store | ||
|
||
# Rider crap | ||
# JetBrains Rider | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
{ | ||
"sdk": { | ||
"version": "7.0.203", | ||
"version": "8.0.101", | ||
"rollForward": "latestFeature" | ||
}, | ||
|
||
"additionalSdks": [ | ||
"6.0.300", | ||
"5.0.403", | ||
"3.1.302" | ||
"6.0.418", | ||
"7.0.405" | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
samples/Sandbox.AspNetCore3_To_3_1/Properties/AssemblyInfo.cs
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
samples/Sandbox.AspNetCore3_To_3_1/Properties/launchSettings.json
This file was deleted.
Oops, something went wrong.
28 changes: 0 additions & 28 deletions
28
samples/Sandbox.AspNetCore3_To_3_1/Sandbox.AspNetCore3_To_3_1.csproj
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
samples/Sandbox.AspNetCore3_To_3_1/appsettings.Development.json
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright (c) Autofac Project. All rights reserved. | ||
// Licensed under the MIT License. See LICENSE in the project root for license information. | ||
|
||
namespace Sandbox; | ||
|
||
/// <summary> | ||
/// Entry pont for the ASP.NET sandbox application. | ||
/// </summary> | ||
public static class Program | ||
{ | ||
/// <summary> | ||
/// Primary method for execution of the sandbox application. | ||
/// </summary> | ||
/// <param name="args"> | ||
/// The set of command line arguments provided to the application. | ||
/// </param> | ||
/// <returns> | ||
/// A <see cref="Task"/> to await completion of the host execution. | ||
/// </returns> | ||
public static async Task Main(string[] args) | ||
{ | ||
// Note the AutofacMultitenantServiceProviderFactory takes the method | ||
// that configures the tenant-specific overrides. That doesn't show up | ||
// in your Startup class. | ||
var host = Host.CreateDefaultBuilder(args) | ||
.UseServiceProviderFactory(new AutofacMultitenantServiceProviderFactory(ContainerSetup.ConfigureMultitenantContainer)) | ||
.ConfigureWebHostDefaults(webHostBuilder => webHostBuilder.UseStartup<Startup>()) | ||
.Build(); | ||
|
||
await host.RunAsync(); | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// Copyright (c) Autofac Project. All rights reserved. | ||
// Licensed under the MIT License. See LICENSE in the project root for license information. | ||
|
||
using Autofac; | ||
|
||
namespace Sandbox; | ||
|
||
/// <summary> | ||
/// Startup logic for the sandbox application. | ||
/// </summary> | ||
public class Startup | ||
{ | ||
/// <summary> | ||
/// Configures default services using the standard Microsoft container. | ||
/// </summary> | ||
/// <param name="services"> | ||
/// The <see cref="IServiceCollection"/> into which registrations will be made. | ||
/// </param> | ||
public void ConfigureServices(IServiceCollection services) | ||
{ | ||
services | ||
.AddAutofacMultitenantRequestServices() | ||
.AddControllers(); | ||
} | ||
|
||
/// <summary> | ||
/// Configures default services that override standard Microsoft services. This method is called after <see cref="ConfigureServices"/> but before multitenant overrides occur. | ||
/// </summary> | ||
/// <param name="builder"> | ||
/// The Autofac <see cref="ContainerBuilder"/> into which default registrations will occur. | ||
/// </param> | ||
public void ConfigureContainer(ContainerBuilder builder) | ||
{ | ||
// Note the multitenant registrations aren't here! They're in | ||
// Program.cs, and they're passed into the | ||
// AutofacMultitenantServiceProviderFactory. | ||
ContainerSetup.ConfigureContainer(builder); | ||
} | ||
|
||
/// <summary> | ||
/// Configures the pipeline for the sandbox application. | ||
/// </summary> | ||
/// <param name="app"> | ||
/// The <see cref="IApplicationBuilder"/> with which the pipeline is being built. | ||
/// </param> | ||
public void Configure(IApplicationBuilder app) | ||
{ | ||
app.UseRouting(); | ||
app.UseEndpoints(builder => builder.MapControllers()); | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
Oops, something went wrong.