I have two modules:
[Module(ModuleName = ModuleNames.Common)]
public class CommonModule: BaseModule
and
[ModuleDependency(ModuleNames.Common)]
[Module(ModuleName = ModuleNames.Branch, OnDemand = true)]
public class BranchModule : BaseModule
Then I register them like this, in Bootstrapper.ConfigureModuleCatalog
:
ctlg.AddModule(ModuleNames.Common, typeof(CommonModule).AssemblyQualifiedName, InitializationMode.WhenAvailable);
ctlg.AddModule(typeof(BranchModule), InitializationMode.OnDemand);
When I inspect the module catalogue, only CommonModule
is correctly configured, because I specify all the module attributes in AddModule
, not because of its [Module(ModuleName = ModuleNames.Common)]
attribute. These attributes seem to plain be ignored, because despite BranchModule
having two attributes, but I don't supply that info in AddModule
, in the catalogue, this module's name is its type name, and it has no dependencies.
What are these attributes for if I still have to duplicate the same info when calling AddModule
?