Removed variable assignment

This commit is contained in:
Chomp
2025-02-02 10:27:31 +00:00
parent f5b4f55032
commit f1fb9b57a0
@@ -19,11 +19,10 @@ public static class DependencyInjectionRegistrator
public static void RegisterComponents(IServiceCollection builderServices, IEnumerable<Type> types)
{
var groupedTypes = types.SelectMany(
t =>
registerableType =>
{
var attributes = (Injectable[])Attribute.GetCustomAttributes(t, typeof(Injectable));
var registerableType = t;
var registerableComponents = new List<RegisterableType>();
var attributes = (Injectable[])Attribute.GetCustomAttributes(registerableType, typeof(Injectable));
var registerableComponentsResult = new List<RegisterableType>();
foreach (var attribute in attributes)
{
// if we have a type override this takes priority
@@ -37,10 +36,10 @@ public static class DependencyInjectionRegistrator
registerableType = registerableType.GetInterfaces()[0];
}
registerableComponents.Add(new RegisterableType(registerableType, t, attribute));
registerableComponentsResult.Add(new RegisterableType(registerableType, registerableType, attribute));
}
return registerableComponents;
return registerableComponentsResult;
}
)
.GroupBy(t => t.RegisterableInterface.FullName);