You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Evoq calls PersonaBarContainer.SetInstace(IPersonaBarContainer, bool) to override the default Persona Bar at application startup. The passed in IPersonaBarContainer argument is an instance of a class that derives from PersonaBarContainer.
Since 697a54e, PersonaBarContainer's constructor requires a INavigationManager argument (which is a breaking change for Evoq).
Creating an instance of INavigationManager during application start up is not possible, because:
The app startup event is not a DI friendly context
Globals.DependencyProvider is internal to core DotNetNuke assemblies only, so I can't call Globals.DependencyProvider.GetRequiredService<INavigationMananger>() from there.
The alternative is to create and register our derived PB container instance using the recommended IDnnStartup method, but then it would be ignored by PersonaBarContainer.Instance property.
Steps to reproduce
Create a project with references to core DotNetNuke assemblies
Add a class that implements IAppEvents
Implement ApplicationBegin() method
Invoke PersonaBarContainer.SetInstance(IPersonaBarContainer, bool) from there
Current result
In order to call above method, an instance of INavigatorManager is required, which cannot be obtained from DI.
Expected result
There should be a way to derive from PersonaBarContainer and call the base constructor, or PersonaBarContainer.Instance should get the object from DI.
Affected version
10.0.0 alpha build
9.4.3 beta build
9.4.1 latest supported release
The text was updated successfully, but these errors were encountered:
Description of bug
Evoq calls
PersonaBarContainer.SetInstace(IPersonaBarContainer, bool)
to override the default Persona Bar at application startup. The passed inIPersonaBarContainer
argument is an instance of a class that derives fromPersonaBarContainer
.Since 697a54e,
PersonaBarContainer
's constructor requires aINavigationManager
argument (which is a breaking change for Evoq).Creating an instance of
INavigationManager
during application start up is not possible, because:Globals.DependencyProvider
is internal to core DotNetNuke assemblies only, so I can't callGlobals.DependencyProvider.GetRequiredService<INavigationMananger>()
from there.The alternative is to create and register our derived PB container instance using the recommended
IDnnStartup
method, but then it would be ignored byPersonaBarContainer.Instance
property.Steps to reproduce
IAppEvents
ApplicationBegin()
methodCurrent result
In order to call above method, an instance of
INavigatorManager
is required, which cannot be obtained from DI.Expected result
There should be a way to derive from
PersonaBarContainer
and call the base constructor, orPersonaBarContainer.Instance
should get the object from DI.Affected version
The text was updated successfully, but these errors were encountered: