Skip to content

Commit bde183a

Browse files
Merge branch 'develop'
2 parents 9a36082 + 8406963 commit bde183a

File tree

7 files changed

+28
-11
lines changed

7 files changed

+28
-11
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Multitenant application support for [Autofac IoC](https://github.com/autofac/Autofac).
44

5-
[![Build status](https://ci.appveyor.com/api/projects/status/9120t73i97ywdoav?svg=true)](https://ci.appveyor.com/project/Autofac/autofac-multitenant) [![codecov](https://codecov.io/gh/Autofac/Autofac.Multitenant/branch/develop/graph/badge.svg)](https://codecov.io/gh/Autofac/Autofac.Multitenant)
5+
[![Build status](https://ci.appveyor.com/api/projects/status/9120t73i97ywdoav?svg=true)](https://ci.appveyor.com/project/Autofac/autofac-multitenant) [![codecov](https://codecov.io/gh/Autofac/Autofac.Multitenant/branch/develop/graph/badge.svg)](https://codecov.io/gh/Autofac/Autofac.Multitenant) [![Open in Visual Studio Code](https://open.vscode.dev/badges/open-in-vscode.svg)](https://open.vscode.dev/autofac/Autofac.Multitenant)
66

77
Please file issues and pull requests for this package in this repository rather than in the Autofac core repo.
88

appveyor.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
image: Ubuntu
22

3-
version: '6.0.0.{build}'
3+
version: '7.0.0.{build}'
44

55
dotnet_csproj:
6-
version_prefix: '6.0.0'
6+
version_prefix: '7.0.0'
77
patch: true
88
file: 'src\**\*.csproj'
99

@@ -33,7 +33,7 @@ deploy:
3333
- provider: NuGet
3434
server: https://www.myget.org/F/autofac/api/v2/package
3535
api_key:
36-
secure: rCUEY75fXN0wxtMy6QL4jCrLdaYbxIBzIXWeN+wEu/XDpyqimzreOc5AH5jMd5ah
36+
secure: xUXExgVAagrdEicCjSxsQVrwiLo2TtnfqMbYB9Cauq2cpbm/EVz957PBK0v/GEYq
3737
skip_symbols: true
3838
symbol_server: https://www.myget.org/F/autofac/symbols/api/v2/package
3939
artifact: MyGet

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "3.1.402",
3+
"version": "7.0.101",
44
"rollForward": "latestFeature"
55
}
66
}

src/Autofac.Multitenant/Autofac.Multitenant.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<Description>Autofac extension for multitenant application support.</Description>
55
<!-- VersionPrefix patched by AppVeyor -->
66
<VersionPrefix>0.0.1</VersionPrefix>
7-
<TargetFrameworks>netstandard2.0;netstandard2.1;</TargetFrameworks>
7+
<TargetFrameworks>net7.0;net6.0;netstandard2.0;netstandard2.1</TargetFrameworks>
88
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
99
<GenerateDocumentationFile>true</GenerateDocumentationFile>
1010
<AssemblyName>Autofac.Multitenant</AssemblyName>
@@ -41,7 +41,7 @@
4141
</ItemGroup>
4242

4343
<ItemGroup>
44-
<PackageReference Include="Autofac" Version="6.0.0" />
44+
<PackageReference Include="Autofac" Version="7.0.0" />
4545
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="2.6.0">
4646
<PrivateAssets>All</PrivateAssets>
4747
</PackageReference>

src/Autofac.Multitenant/MultitenantContainer.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
using System.Diagnostics;
2929
using System.Diagnostics.CodeAnalysis;
3030
using System.Globalization;
31+
#if NET5_0_OR_GREATER
32+
using System.Runtime.Loader;
33+
#endif
3134
using System.Threading.Tasks;
3235
using Autofac.Core;
3336
using Autofac.Core.Lifetime;
@@ -299,6 +302,20 @@ public ILifetimeScope BeginLifetimeScope(object tag, Action<ContainerBuilder> co
299302
return this.GetCurrentTenantScope().BeginLifetimeScope(tag, configurationAction);
300303
}
301304

305+
#if NET5_0_OR_GREATER
306+
/// <inheritdoc />
307+
public ILifetimeScope BeginLoadContextLifetimeScope(AssemblyLoadContext loadContext, Action<ContainerBuilder> configurationAction)
308+
{
309+
return this.GetCurrentTenantScope().BeginLoadContextLifetimeScope(loadContext, configurationAction);
310+
}
311+
312+
/// <inheritdoc />
313+
public ILifetimeScope BeginLoadContextLifetimeScope(object tag, AssemblyLoadContext loadContext, Action<ContainerBuilder> configurationAction)
314+
{
315+
return this.GetCurrentTenantScope().BeginLoadContextLifetimeScope(tag, loadContext, configurationAction);
316+
}
317+
#endif
318+
302319
/// <summary>
303320
/// Allows configuration of tenant-specific components. You may only call this
304321
/// method if the tenant is not currently configured.

test/Autofac.Multitenant.AspNetCore.Test/Autofac.Multitenant.AspNetCore.Test.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
4+
<TargetFramework>net7.0</TargetFramework>
55
<NoWarn>$(NoWarn);CS1591;SA1602;SA1611</NoWarn>
66
<GenerateDocumentationFile>true</GenerateDocumentationFile>
77
<AssemblyName>Autofac.Multitenant.AspNetCore.Test</AssemblyName>
@@ -22,12 +22,12 @@
2222
<ItemGroup>
2323
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
2424
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.2" />
25-
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="7.0.1" />
25+
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="8.0.0" />
2626
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
2727
<PrivateAssets>All</PrivateAssets>
2828
</PackageReference>
2929
<PackageReference Include="xunit" Version="2.4.1" />
30-
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.6" />
30+
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
3131
<PackageReference Include="coverlet.collector" Version="1.3.0" />
3232
<PackageReference Include="coverlet.msbuild" Version="2.9.0" />
3333
</ItemGroup>

test/Autofac.Multitenant.Test/Autofac.Multitenant.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
4+
<TargetFramework>net7.0</TargetFramework>
55
<NoWarn>$(NoWarn);CS1591;SA1602;SA1611</NoWarn>
66
<GenerateDocumentationFile>true</GenerateDocumentationFile>
77
<AssemblyName>Autofac.Multitenant.Test</AssemblyName>

0 commit comments

Comments
 (0)