I need an additional service in the SecurityService (defined in SecurityService.cs), so I planned to add a constructor that takes my service as a parameter. I checked the class for avoiding parameter ambiguity and did not expect to find another constructor than the default constructor, because in Startup.cs the SecurityService is added like this:
services.AddScoped<SecurityService>();
But there is already a constructor that takes a parameter in SecurityService.cs, but it seems to be never called:
SecurityService(NavigationManager navigationManager)
When it is never called (tested in the debugger), why does the function Logout()
from the SecurityService class works at all? I checked in the debugger and the navigationManager attribute is properly initiated and available.
Thanks for helping me to understand the code a bit better to get my customizations right