Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
alistairjevans committed Mar 8, 2023
2 parents 9a36082 + 8406963 commit bde183a
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

[![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)
[![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)

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

Expand Down
6 changes: 3 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
image: Ubuntu

version: '6.0.0.{build}'
version: '7.0.0.{build}'

dotnet_csproj:
version_prefix: '6.0.0'
version_prefix: '7.0.0'
patch: true
file: 'src\**\*.csproj'

Expand Down Expand Up @@ -33,7 +33,7 @@ deploy:
- provider: NuGet
server: https://www.myget.org/F/autofac/api/v2/package
api_key:
secure: rCUEY75fXN0wxtMy6QL4jCrLdaYbxIBzIXWeN+wEu/XDpyqimzreOc5AH5jMd5ah
secure: xUXExgVAagrdEicCjSxsQVrwiLo2TtnfqMbYB9Cauq2cpbm/EVz957PBK0v/GEYq
skip_symbols: true
symbol_server: https://www.myget.org/F/autofac/symbols/api/v2/package
artifact: MyGet
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "3.1.402",
"version": "7.0.101",
"rollForward": "latestFeature"
}
}
4 changes: 2 additions & 2 deletions src/Autofac.Multitenant/Autofac.Multitenant.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Description>Autofac extension for multitenant application support.</Description>
<!-- VersionPrefix patched by AppVeyor -->
<VersionPrefix>0.0.1</VersionPrefix>
<TargetFrameworks>netstandard2.0;netstandard2.1;</TargetFrameworks>
<TargetFrameworks>net7.0;net6.0;netstandard2.0;netstandard2.1</TargetFrameworks>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>Autofac.Multitenant</AssemblyName>
Expand Down Expand Up @@ -41,7 +41,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Autofac" Version="6.0.0" />
<PackageReference Include="Autofac" Version="7.0.0" />
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="2.6.0">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
Expand Down
17 changes: 17 additions & 0 deletions src/Autofac.Multitenant/MultitenantContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
#if NET5_0_OR_GREATER
using System.Runtime.Loader;
#endif
using System.Threading.Tasks;
using Autofac.Core;
using Autofac.Core.Lifetime;
Expand Down Expand Up @@ -299,6 +302,20 @@ public ILifetimeScope BeginLifetimeScope(object tag, Action<ContainerBuilder> co
return this.GetCurrentTenantScope().BeginLifetimeScope(tag, configurationAction);
}

#if NET5_0_OR_GREATER
/// <inheritdoc />
public ILifetimeScope BeginLoadContextLifetimeScope(AssemblyLoadContext loadContext, Action<ContainerBuilder> configurationAction)
{
return this.GetCurrentTenantScope().BeginLoadContextLifetimeScope(loadContext, configurationAction);
}

/// <inheritdoc />
public ILifetimeScope BeginLoadContextLifetimeScope(object tag, AssemblyLoadContext loadContext, Action<ContainerBuilder> configurationAction)
{
return this.GetCurrentTenantScope().BeginLoadContextLifetimeScope(tag, loadContext, configurationAction);
}
#endif

/// <summary>
/// Allows configuration of tenant-specific components. You may only call this
/// method if the tenant is not currently configured.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<NoWarn>$(NoWarn);CS1591;SA1602;SA1611</NoWarn>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>Autofac.Multitenant.AspNetCore.Test</AssemblyName>
Expand All @@ -22,12 +22,12 @@
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.2" />
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="7.0.1" />
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.6" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
<PackageReference Include="coverlet.collector" Version="1.3.0" />
<PackageReference Include="coverlet.msbuild" Version="2.9.0" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<NoWarn>$(NoWarn);CS1591;SA1602;SA1611</NoWarn>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>Autofac.Multitenant.Test</AssemblyName>
Expand Down

0 comments on commit bde183a

Please sign in to comment.