From 7bceb8064dfa594c179a2c6fac50ff079410dc31 Mon Sep 17 00:00:00 2001 From: Chris Rudolphi <1702962+clrudolphi@users.noreply.github.com> Date: Thu, 7 Nov 2024 16:13:20 -0600 Subject: [PATCH] Experimental commit - enhance BoDi to include the name of the Interface when throwing an 'already resolved' registration exception. --- Reqnroll/BoDi/ObjectContainer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Reqnroll/BoDi/ObjectContainer.cs b/Reqnroll/BoDi/ObjectContainer.cs index 9f7df16c6..00ad7e13b 100644 --- a/Reqnroll/BoDi/ObjectContainer.cs +++ b/Reqnroll/BoDi/ObjectContainer.cs @@ -500,7 +500,7 @@ public bool IsRegistered(Type type, string name = null) private void AssertNotResolved(RegistrationKey interfaceType) { if (_resolvedKeys.Contains(interfaceType)) - throw new ObjectContainerException("An object has been resolved for this interface already.", null); + throw new ObjectContainerException($"An object has been resolved for this interface({interfaceType.ToString()}) already.", null); } private void ClearRegistrations(RegistrationKey registrationKey)