Skip to content

Commit 22b3a16

Browse files
committed
Update all dependencies, enable nullable on tests.
1 parent 60c07c3 commit 22b3a16

17 files changed

Lines changed: 44 additions & 34 deletions

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ repos:
88
- id: end-of-file-fixer
99
- id: trailing-whitespace
1010
- repo: https://github.com/igorshubovych/markdownlint-cli
11-
rev: "e72a3ca1632f0b11a07d171449fe447a7ff6795e" # frozen: v0.48.0
11+
rev: "c7c1c7640e610068e8e4754e9f1bf109bd987dc7" # post-v0.48.0 with patches
1212
hooks:
1313
- id: markdownlint
1414
args:

Autofac.Extensions.DependencyInjection.sln.DotSettings

Lines changed: 0 additions & 2 deletions
This file was deleted.

Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
44
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
55
</PropertyGroup>
6+
<PropertyGroup><NuGetAudit>false</NuGetAudit></PropertyGroup>
67
</Project>

README.md

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

33
Autofac is an [IoC container](http://martinfowler.com/articles/injection.html) for Microsoft .NET. It manages the dependencies between classes so that **applications stay easy to change as they grow** in size and complexity. This is achieved by treating regular .NET classes as *[components](https://autofac.readthedocs.io/en/latest/glossary.html)*.
44

5-
[![Build status](https://ci.appveyor.com/api/projects/status/1mhkjcqr1ug80lra/branch/develop?svg=true)](https://ci.appveyor.com/project/Autofac/autofac-extensions-dependencyinjection/branch/develop) [![codecov](https://codecov.io/gh/Autofac/Autofac.Extensions.DependencyInjection/branch/develop/graph/badge.svg)](https://codecov.io/gh/Autofac/Autofac.Extensions.DependencyInjection)
5+
[![Build status](https://github.com/autofac/Autofac.Extensions.DependencyInjection/actions/workflows/main.yml/badge.svg)](https://github.com/autofac/Autofac.Extensions.DependencyInjection/actions/workflows/main.yml) [![codecov](https://codecov.io/gh/Autofac/Autofac.Extensions.DependencyInjection/branch/develop/graph/badge.svg)](https://codecov.io/gh/Autofac/Autofac.Extensions.DependencyInjection) [![NuGet](https://img.shields.io/nuget/v/Autofac.Extensions.DependencyInjection.svg)](https://nuget.org/packages/Autofac.Extensions.DependencyInjection)
66

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

bench/Autofac.Extensions.DependencyInjection.Bench/Autofac.Extensions.DependencyInjection.Bench.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@
2828
</ItemGroup>
2929
<ItemGroup>
3030
<PackageReference Include="BenchmarkDotNet" Version="0.15.8" />
31-
<PackageReference Include="coverlet.collector" Version="8.0.0">
31+
<PackageReference Include="coverlet.collector" Version="10.0.1">
3232
<PrivateAssets>all</PrivateAssets>
3333
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3434
</PackageReference>
35-
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.4" />
36-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.3.0" />
35+
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.9" />
36+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.6.0" />
3737
<PackageReference Include="SonarAnalyzer.CSharp" Version="10.27.0.140913">
3838
<PrivateAssets>all</PrivateAssets>
3939
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

default.proj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@
6363
<Exec Command="dotnet build &quot;%(SolutionFile.FullPath)&quot; -c $(Configuration) /p:Version=$(Version)" />
6464
</Target>
6565
<Target Name="Package">
66-
<MakeDir Directories="$([System.IO.Path]::Combine($(PackageDirectory),%(PublishProject.Filename)))" />
67-
<Exec Command="dotnet pack &quot;%(SolutionFile.FullPath)&quot; -c $(Configuration) --output &quot;$(PackageDirectory)&quot; /p:Version=$(Version)" />
66+
<MakeDir Directories="$(PackageDirectory)" />
67+
<Exec Command="dotnet pack &quot;%(SourceProject.Identity)&quot; -c $(Configuration) --no-build --output &quot;$(PackageDirectory)&quot; /p:Version=$(Version)" />
6868
</Target>
6969
<Target Name="Test">
7070
<MakeDir Directories="$(LogDirectory)" />

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
33
"rollForward": "latestFeature",
4-
"version": "10.0.100"
4+
"version": "10.0.203"
55
}
66
}

src/Autofac.Extensions.DependencyInjection/Autofac.Extensions.DependencyInjection.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@
5353
<AdditionalFiles Include="..\..\build\stylecop.json" Link="stylecop.json" />
5454
</ItemGroup>
5555
<ItemGroup>
56-
<PackageReference Include="Autofac" Version="9.1.0" />
56+
<PackageReference Include="Autofac" Version="9.2.0" />
57+
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.9" />
5758
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="10.0.300" Condition="Exists('$(MSBuildThisFileDirectory)../../.git')">
5859
<PrivateAssets>all</PrivateAssets>
5960
</PackageReference>
@@ -64,7 +65,6 @@
6465
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556">
6566
<PrivateAssets>all</PrivateAssets>
6667
</PackageReference>
67-
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.8" />
6868
</ItemGroup>
6969
<ItemDefinitionGroup>
7070
<EmbeddedResource>

test/Autofac.Extensions.DependencyInjection.Integration.Test/Autofac.Extensions.DependencyInjection.Integration.Test.csproj

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,31 @@
1212
<IsPackable>false</IsPackable>
1313
<LangVersion>latest</LangVersion>
1414
<ImplicitUsings>enable</ImplicitUsings>
15+
<Nullable>enable</Nullable>
1516
</PropertyGroup>
16-
17+
<ItemGroup>
18+
<Using Include="Xunit" />
19+
</ItemGroup>
1720
<ItemGroup>
1821
<ProjectReference Include="..\..\src\Autofac.Extensions.DependencyInjection\Autofac.Extensions.DependencyInjection.csproj" />
1922
</ItemGroup>
2023
<ItemGroup>
2124
<AdditionalFiles Include="..\..\build\stylecop.json" Link="stylecop.json" />
2225
</ItemGroup>
2326
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
24-
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.25" />
27+
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.28" />
2528
<ProjectReference Include="..\Integration.Net8\Integration.Net8.csproj" />
2629
</ItemGroup>
2730
<ItemGroup Condition=" '$(TargetFramework)' == 'net10.0' ">
28-
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.8" />
31+
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.9" />
2932
<ProjectReference Include="..\Integration.Net10\Integration.Net10.csproj" />
3033
</ItemGroup>
3134
<ItemGroup>
32-
<PackageReference Include="coverlet.collector" Version="8.0.0">
35+
<PackageReference Include="coverlet.collector" Version="10.0.1">
3336
<PrivateAssets>all</PrivateAssets>
3437
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3538
</PackageReference>
36-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.3.0" />
39+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.6.0" />
3740
<PackageReference Include="SonarAnalyzer.CSharp" Version="10.27.0.140913">
3841
<PrivateAssets>all</PrivateAssets>
3942
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
@@ -45,7 +48,7 @@
4548
<PackageReference Include="xunit" Version="2.9.3" />
4649
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
4750
<PrivateAssets>all</PrivateAssets>
48-
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
51+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
4952
</PackageReference>
5053
</ItemGroup>
5154
</Project>

test/Autofac.Extensions.DependencyInjection.Test/Assertions.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,19 @@ namespace Autofac.Extensions.DependencyInjection.Test;
88
internal static class Assertions
99
{
1010
public static void AssertRegistered<TService>(this IComponentContext context)
11+
where TService : notnull
1112
{
1213
Assert.True(context.IsRegistered<TService>());
1314
}
1415

1516
public static void AssertNotRegistered<TService>(this IComponentContext context)
17+
where TService : notnull
1618
{
1719
Assert.False(context.IsRegistered<TService>());
1820
}
1921

2022
public static void AssertImplementation<TService, TImplementation>(this IComponentContext context)
23+
where TService : notnull
2124
{
2225
var service = context.Resolve<TService>();
2326
Assert.IsAssignableFrom<TImplementation>(service);

0 commit comments

Comments
 (0)