Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ jobs:
uses: actions/setup-dotnet@v3
with:
dotnet-version: 9.0.x
- name: Setup .NET 8
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x


- name: Test
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/publish_lamar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ jobs:
with:
dotnet-version: 9.0.x

- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.x

- name: Build
run: dotnet build Lamar.sln --configuration Release

Expand Down
2 changes: 1 addition & 1 deletion src/Aspect.Logger/Widget.Aspect.Logger.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<TargetFrameworks>net9.0;net10.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<TargetFrameworks>net9.0;net10.0</TargetFrameworks>

<IsPackable>false</IsPackable>
</PropertyGroup>
Expand All @@ -17,24 +17,6 @@
<PackageReference Include="coverlet.collector" Version="1.0.1" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="[6.0.0,7.0.0)" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="[6.0.0,7.0.0)" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="[6.0.0,7.0.0)" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="[6.0.0,7.0.0)" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="[6.0.0,7.0.0)" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="[6.0.0,7.0.0)" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="[8.0.0,9.0.0)" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="[8.0.0,9.0.0)" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="[8.0.0,9.0.0)" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="[8.0.0,9.0.0)" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="[8.0.0,9.0.0)" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="[8.0.0,9.0.0)" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net9.0' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="[9.0.0,10.0.0)" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="[9.0.0,10.0.0)" />
Expand Down
12 changes: 2 additions & 10 deletions src/Lamar.AspNetCoreTests/Lamar.AspNetCoreTests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<TargetFrameworks>net9.0;net10.0</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand All @@ -21,15 +21,7 @@
<PackageReference Include="Shouldly" Version="4.2.1" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<PackageReference Include=" Microsoft.Extensions.Diagnostics.HealthChecks" Version="[6.0.0,7.0.0)" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<PackageReference Include=" Microsoft.Extensions.Diagnostics.HealthChecks" Version="[8.0.0,9.0.0)" />
</ItemGroup>

<ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Lamar.Microsoft.DependencyInjection\Lamar.Microsoft.DependencyInjection.csproj" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>Lamar Adapter for HostBuilder Integration</Description>
<Version>15.1.0</Version>
<Version>16.0.0</Version>
<Authors>Jeremy D. Miller</Authors>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<TargetFrameworks>net9.0;net10.0</TargetFrameworks>
<DebugType>portable</DebugType>
<AssemblyName>Lamar.Microsoft.DependencyInjection</AssemblyName>
<PackageId>Lamar.Microsoft.DependencyInjection</PackageId>
Expand Down
2 changes: 1 addition & 1 deletion src/Lamar.Testing/Lamar.Testing.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<TargetFrameworks>net9.0;net10.0</TargetFrameworks>
<LangVersion>10.0</LangVersion>
</PropertyGroup>
<ItemGroup>
Expand Down
8 changes: 7 additions & 1 deletion src/Lamar/IoC/Enumerables/ArrayInstance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,13 @@ protected override IEnumerable<Instance> createPlan(ServiceGraph services)
}
else
{
Elements = services.FindAll(typeof(T));
// MS DI's IServiceProvider.GetServices(T) (and by extension T[] resolution) returns
// only non-keyed registrations; keyed registrations are looked up explicitly via
// GetKeyedService(T, key). Match that here so a keyed-mirror registration of the
// same service type doesn't end up as a T[] element. Otherwise inlining the
// mirror's Singleton via QuickResolve invokes the mirror's factory, which calls
// sp.GetServices(T) again and recursively re-enters codegen — stack overflow.
Elements = services.FindAll(typeof(T)).Where(x => !x.IsKeyedService).ToArray();
}

return Elements;
Expand Down
8 changes: 7 additions & 1 deletion src/Lamar/IoC/Enumerables/ListInstance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,13 @@ protected override IEnumerable<Instance> createPlan(ServiceGraph services)
}
else
{
Elements = services.FindAll(typeof(T));
// MS DI's IServiceProvider.GetServices(T) returns only non-keyed registrations;
// keyed registrations are looked up explicitly via GetKeyedService(T, key). Match
// that here so a keyed-mirror registration of the same service type doesn't end up
// as an IEnumerable<T> element. Otherwise inlining the mirror's Singleton via
// QuickResolve invokes the mirror's factory, which calls sp.GetServices(T) again
// and recursively re-enters ListInstance/ArrayInstance code-gen — stack overflow.
Elements = services.FindAll(typeof(T)).Where(x => !x.IsKeyedService).ToArray();
}

return Elements;
Expand Down
10 changes: 2 additions & 8 deletions src/Lamar/Lamar.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>Fast ASP.Net Core compatible IoC Tool, Successor to StructureMap</Description>
<Version>15.1.0</Version>
<Version>16.0.0</Version>
<Authors>Jeremy D. Miller</Authors>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<TargetFrameworks>net9.0;net10.0</TargetFrameworks>
<DebugType>portable</DebugType>
<AssemblyName>Lamar</AssemblyName>
<PackageId>Lamar</PackageId>
Expand All @@ -26,12 +26,6 @@
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.0"/>
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0"/>
<PackageReference Include="System.Runtime.Loader" Version="4.3.0"/>
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0"/>
</ItemGroup>

<ItemGroup>
<PackageReference Include="JasperFx" Version="1.10.1" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<TargetFrameworks>net9.0;net10.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/LamarWithAspNetCore3/LamarWithAspNetCore3.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<TargetFrameworks>net9.0;net10.0</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/LamarWithAspNetCoreMvc3/LamarWithAspNetCoreMvc3.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<TargetFrameworks>net9.0;net10.0</TargetFrameworks>
</PropertyGroup>


Expand Down
2 changes: 1 addition & 1 deletion src/LamarWithIdentityOnNet5/LamarWithIdentityOnNet5.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<TargetFrameworks>net9.0;net10.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<TargetFrameworks>net9.0;net10.0</TargetFrameworks>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>

Expand Down
2 changes: 1 addition & 1 deletion src/MinimalApiTests/MinimalApiTests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<TargetFrameworks>net9.0;net10.0</TargetFrameworks>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<TargetFrameworks>net9.0;net10.0</TargetFrameworks>
<AssemblyName>StructureMap.Testing.ExeWidget</AssemblyName>
<OutputType>Exe</OutputType>
<PackageId>StructureMap.Testing.ExeWidget</PackageId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<TargetFrameworks>net9.0;net10.0</TargetFrameworks>
<AssemblyName>StructureMap.Testing.GenericWidgets</AssemblyName>
<PackageId>StructureMap.Testing.GenericWidgets</PackageId>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<TargetFrameworks>net9.0;net10.0</TargetFrameworks>
<AssemblyName>StructureMap.Testing.Widget</AssemblyName>
<PackageId>StructureMap.Testing.Widget</PackageId>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<TargetFrameworks>net9.0;net10.0</TargetFrameworks>
<AssemblyName>StructureMap.Testing.Widget2</AssemblyName>
<PackageId>StructureMap.Testing.Widget2</PackageId>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<TargetFrameworks>net9.0;net10.0</TargetFrameworks>
<AssemblyName>StructureMap.Testing.Widget3</AssemblyName>
<PackageId>StructureMap.Testing.Widget3</PackageId>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<TargetFrameworks>net9.0;net10.0</TargetFrameworks>
<AssemblyName>StructureMap.Testing.Widget4</AssemblyName>
<PackageId>StructureMap.Testing.Widget4</PackageId>
<NetStandardImplicitPackageVersion Condition=" '$(TargetFramework)' == 'netstandard1.5' ">1.6.0</NetStandardImplicitPackageVersion>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<TargetFrameworks>net9.0;net10.0</TargetFrameworks>
<AssemblyName>StructureMap.Testing.Widget5</AssemblyName>
<PackageId>StructureMap.Testing.Widget5</PackageId>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
Expand Down
2 changes: 1 addition & 1 deletion src/UserApp/UserApp.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<TargetFrameworks>net9.0;net10.0</TargetFrameworks>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/Widget.Core/Widget.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<TargetFrameworks>net9.0;net10.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Widget.Instance/Widget.Instance.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<TargetFrameworks>net9.0;net10.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Widget.Registration/Widget.Registration.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<TargetFrameworks>net9.0;net10.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Loading