From bb6d54ec98ecebfb74d864b7dbce70b2e7a9b83b Mon Sep 17 00:00:00 2001 From: "Jeremy D. Miller" Date: Mon, 15 Jan 2024 12:25:29 -0600 Subject: [PATCH] Hardening the "can you resolve this type" determination against bi-directional dependencies. Wolverine issue. Bumps to 13.0.1 --- src/Lamar.Diagnostics/Lamar.Diagnostics.csproj | 2 +- .../Lamar.Microsoft.DependencyInjection.csproj | 2 +- src/Lamar/Lamar.csproj | 2 +- src/Lamar/ServiceGraph.cs | 9 ++++++++- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/Lamar.Diagnostics/Lamar.Diagnostics.csproj b/src/Lamar.Diagnostics/Lamar.Diagnostics.csproj index fb027dda..dc589858 100644 --- a/src/Lamar.Diagnostics/Lamar.Diagnostics.csproj +++ b/src/Lamar.Diagnostics/Lamar.Diagnostics.csproj @@ -2,7 +2,7 @@ Adds diagnostic checks to the command line of your Lamar-enabled ASP.Net Core app - 13.0.0 + 13.0.1 Jeremy D. Miller net6.0;net7.0;net8.0 portable diff --git a/src/Lamar.Microsoft.DependencyInjection/Lamar.Microsoft.DependencyInjection.csproj b/src/Lamar.Microsoft.DependencyInjection/Lamar.Microsoft.DependencyInjection.csproj index 4c19bc64..30413755 100644 --- a/src/Lamar.Microsoft.DependencyInjection/Lamar.Microsoft.DependencyInjection.csproj +++ b/src/Lamar.Microsoft.DependencyInjection/Lamar.Microsoft.DependencyInjection.csproj @@ -1,7 +1,7 @@  Lamar Adapter for HostBuilder Integration - 13.0.0 + 13.0.1 Jeremy D. Miller net6.0;net7.0;net8.0 portable diff --git a/src/Lamar/Lamar.csproj b/src/Lamar/Lamar.csproj index d0f69964..af751d3d 100644 --- a/src/Lamar/Lamar.csproj +++ b/src/Lamar/Lamar.csproj @@ -1,7 +1,7 @@  Fast ASP.Net Core compatible IoC Tool, Successor to StructureMap - 13.0.0 + 13.0.1 Jeremy D. Miller net6.0;net7.0;net8.0 portable diff --git a/src/Lamar/ServiceGraph.cs b/src/Lamar/ServiceGraph.cs index 0c4e7de6..1ab77403 100644 --- a/src/Lamar/ServiceGraph.cs +++ b/src/Lamar/ServiceGraph.cs @@ -513,7 +513,14 @@ internal void ClearPlanning() public bool CouldResolve(Type type) { - return FindDefault(type) != null; + try + { + return FindDefault(type) != null; + } + catch (Exception) + { + return false; + } }