I am writing modular Prism application, witch is loading module files from directory (dll files). As developer I don't know how many of that modules would be in that directory, what kind of that etc.
In my application I need to get some metadata from imported modules - i.e. state (if it would be window/panel/window element/utility module), icon, localized title etc.
I know I can achieve that by creating something like Module.config file in each module, then access it in main application by ModuleInfo.Ref
path (one level up -> then get Module.config file path) - but I don't want to do this that way.
I wonder if Prism got any possibility to pass metadata by code (Interface for metadata mode? XML string? Dynamic object?) If not - how can I implement it and which classes should I override?
Thank you for any advice!
MetadataStore
(IMetadataStore
) created and registered with theContainer
duringBootstrap
and inject thatIMetadataStore
into each module and then each module registers its metadata duringInitialize()
? – Suresh