Fix up tooling to handle new types in DI (#434)

* Fix up tooling to handle new types in DI

* Remove usings
This commit is contained in:
Jesse
2025-06-29 15:40:49 +02:00
committed by GitHub
parent 1c5e82187e
commit 7ab24629e2
3 changed files with 11 additions and 15 deletions
@@ -13,8 +13,6 @@ public class DependencyInjectionHandler(IServiceCollection serviceCollection)
private readonly Dictionary<string, object> _injectedValues = new();
private readonly Lock _injectedValuesLock = new();
private readonly HashSet<string> _typeNamesToSkip = [];
private bool _oneTimeUseFlag;
public void AddInjectableTypesFromAssembly(Assembly assembly)
@@ -45,11 +43,6 @@ public class DependencyInjectionHandler(IServiceCollection serviceCollection)
{
foreach (var type in typesToInject)
{
if (_typeNamesToSkip.Contains(type.Name))
{
continue;
}
_injectedTypeNames.Add($"{type.Namespace}.{type.Name}", type);
}
}
@@ -140,11 +133,6 @@ public class DependencyInjectionHandler(IServiceCollection serviceCollection)
}
}
public void AddTypeNamesToIgnore(HashSet<string> typeNames)
{
_typeNamesToSkip.UnionWith(typeNames);
}
private void RegisterGenericComponents(TypeRefContainer typeRef)
{
try