Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I loosely reference modules in Prism so they can or cannot exist?
    primarykey
    data
    text
    <p>In <a href="https://stackoverflow.com/questions/1153619/can-someone-explain-the-magic-going-on-in-prisms-resolve-method">this stackoverflow question</a> I learned that <strong>Prism/Unity is not as decoupled as I thought</strong>, e.g. if I have this class which gets menuManager injected into its constructor, then I have to <strong>make sure</strong> that this class actually <strong>exists somewhere</strong> (I thought that you could just pull the .dll that contains the class and the container would deal with it, e.g. injecting a null in its place):</p> <pre><code>public class EmployeesPresenter { public EmployeesPresenter(IMenuManager menuManager) { } } </code></pre> <p>But I can deal with that: the application cannot run without a MenuModule (or else as was suggested I could have a <strong>NullMenuModule</strong> which does nothing but keeps the application from breaking).</p> <p>However, the application I am building will have a <strong>MenuManager class</strong> in the MenuModule and every module will have to register everything it wants to have in the menu with the MenuManager. However, I want to be able to <strong>swap out MenuModules</strong> e.g. have a <strong>InfragisticsMenuModule</strong> and have a <strong>TelerikMenuModule</strong>, etc.</p> <p>However, when I am in e.g. the CustomersModule, in order to use TelerikMenuModule, <strong>I need to reference it</strong>. And when I want to use InfragisticsMenuModule, I need to reference that. </p> <p><strong>So how will I be able to "hot swap" TelerikMenuModule with InfragisticsMenuModule without recompiling all my modules with new references</strong>, e.g. I want to replace this:</p> <pre><code>Application.exe Customers.dll TelerikMenuModule.dll </code></pre> <p>with this:</p> <pre><code>Application.exe Customers.dll InfragisticsMenuModule.dll </code></pre> <p>and simply be able to restart the application and it runs with the new InfragisticsMenuModule.dll and <em>does not complain that TelerikMenuModule.dll no longer exists</em>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload