Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
alistairjevans committed Sep 30, 2020
2 parents 533a37e + 22d6143 commit 420e5b2
Show file tree
Hide file tree
Showing 22 changed files with 79 additions and 209 deletions.
2 changes: 1 addition & 1 deletion Autofac.AspNetCore.Multitenant.sln
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
codecov.yml = codecov.yml
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sandbox.AspNetCore3", "samples\Sandbox.AspNetCore3\Sandbox.AspNetCore3.csproj", "{12445470-D348-467F-8D3F-FBD6EF525CEE}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sandbox.AspNetCore3_To_3_1", "samples\Sandbox.AspNetCore3_To_3_1\Sandbox.AspNetCore3_To_3_1.csproj", "{12445470-D348-467F-8D3F-FBD6EF525CEE}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{8C9BBEEC-0C4B-4ECD-B927-63899C265FB4}"
EndProject
Expand Down
88 changes: 0 additions & 88 deletions CONTRIBUTING.md

This file was deleted.

11 changes: 0 additions & 11 deletions ISSUE_TEMPLATE.md

This file was deleted.

4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
image: Ubuntu

version: 3.0.2.{build}
version: 4.0.0.{build}

dotnet_csproj:
version_prefix: '3.0.2'
version_prefix: '4.0.0'
patch: true
file: 'src\**\*.csproj'

Expand Down
5 changes: 5 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
codecov:
branch: develop
require_ci_to_pass: yes
coverage:
status:
project:
default:
threshold: 1%
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.302",
"version": "3.1.401",
"rollForward": "latestFeature"
}
}
4 changes: 2 additions & 2 deletions samples/Sandbox.AspNetCore2_1_To_2_2/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@

namespace Sandbox.AspNetCore2_1_To_2_2
{
public class Program
public static class Program
{
public static Task Main(string[] args)
{
return CreateWebHostBuilder(args).Build().RunAsync();
}

public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
private static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>()
.UseAutofacMultitenantRequestServices()
Expand Down
29 changes: 0 additions & 29 deletions samples/Sandbox.AspNetCore3/Properties/launchSettings.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
using Microsoft.AspNetCore.Hosting;
using System.Threading.Tasks;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Sandbox.Shared;

namespace Sandbox
{
public class Program
public static class Program
{
public static async Task Main(string[] args)
{
var host = Host.CreateDefaultBuilder(args)
.UseServiceProviderFactory(new AutofacMultitenantServiceProviderFactory(MultitenantContainerSetup.ConfigureMultitenantContainer))
.UseServiceProviderFactory(
new AutofacMultitenantServiceProviderFactory(
MultitenantContainerSetup.ConfigureMultitenantContainer))
.ConfigureWebHostDefaults(webHostBuilder => webHostBuilder.UseStartup<Startup>())
.Build();


await host.RunAsync();
}
}
}
}
13 changes: 13 additions & 0 deletions samples/Sandbox.AspNetCore3_To_3_1/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"profiles": {
"Sandbox.Sandbox.AspNetCore3_To_3_1": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "api/values",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://localhost:35115"
}
}
}
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RootNamespace>Sandbox</RootNamespace>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
using System;
using Autofac;
using Autofac.Extensions.DependencyInjection;
using Autofac.Multitenant;
using Autofac;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Sandbox.Shared;

namespace Sandbox
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Description>ASP.NET Core support for multitenant DI via Autofac.Multitenant.</Description>
<!-- VersionPrefix patched by AppVeyor -->
<VersionPrefix>0.0.1</VersionPrefix>
<TargetFrameworks>netstandard2.0;netcoreapp3.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netcoreapp3.1</TargetFrameworks>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>Autofac.Integration.AspNetCore.Multitenant</AssemblyName>
Expand Down Expand Up @@ -37,13 +37,13 @@
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="2.1.0" />
</ItemGroup>

<ItemGroup Condition="$(TargetFramework) == 'netcoreapp3.0'">
<ItemGroup Condition="$(TargetFramework) == 'netcoreapp3.1'">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="6.0.0" />
<PackageReference Include="Autofac.Multitenant" Version="5.0.1" />
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="7.0.1" />
<PackageReference Include="Autofac.Multitenant" Version="6.0.0" />
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="2.6.1">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@
namespace Autofac.Integration.AspNetCore.Multitenant
{
/// <summary>
/// Extension methods for use with the <see cref="AutofacMultitenantServiceProvider"/>.
/// Extension methods for use with the <see cref="AutofacServiceProvider"/>.
/// </summary>
public static class AutofacMultitenantServiceProviderExtensions
{
/// <summary>
/// Tries to cast the instance of <see cref="MultitenantContainer"/> from <see cref="AutofacMultitenantServiceProvider"/> when possible.
/// Tries to cast the instance of <see cref="MultitenantContainer"/> from <see cref="AutofacServiceProvider"/> when possible.
/// </summary>
/// <param name="serviceProvider">The instance of <see cref="IServiceProvider"/>.</param>
/// <returns>Returns the instance of <see cref="MultitenantContainer"/> exposed by <see cref="AutofacMultitenantServiceProvider"/> when it can be casted down from <see cref="ILifetimeScope"/>.</returns>
/// <returns>Returns the instance of <see cref="MultitenantContainer"/> exposed by <see cref="AutofacServiceProvider"/> when it can be casted down from <see cref="ILifetimeScope"/>.</returns>
/// <exception cref="InvalidOperationException">
/// Thrown if <paramref name="serviceProvider" /> can't be casted to <see cref="MultitenantContainer"/>.
/// </exception>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public IServiceProvider CreateServiceProvider(ContainerBuilder containerBuilder)

if (multitenantContainer == null) throw new InvalidOperationException(Resources.NoMultitenantContainerAvailable);

return new AutofacMultitenantServiceProvider(multitenantContainer);
return new AutofacServiceProvider(multitenantContainer);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
<PackageReference Include="Moq" Version="4.13.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="Moq" Version="4.14.5" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="3.1.0" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="3.1.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="3.1.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="3.1.8" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="3.1.8" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="3.1.8" />
<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,4 +1,5 @@
using System;
using Autofac.Integration.AspNetCore.Multitenant.Properties;
using Autofac.Multitenant;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
Expand Down
Loading

0 comments on commit 420e5b2

Please sign in to comment.