Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4253340
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T04:55:58+00:00 2026-05-21T04:55:58+00:00

I recently converted from MEF to Unity – for various reasons. I previously had

  • 0

I recently converted from MEF to Unity – for various reasons.

I previously had a IMenuService object in a module that I exported with MEF and imported in other modules. I believe what I have to do with Unity is take the unity container in as a parameter to the constructor of my module, then use that to register the IMenuService , however, I’m not sure how to do this (what argument type? do I have to first register the container in the bootstrapper to import it into the module?)

Also, in MEF there are ModuleDependency attributes to make sure other modules are loaded first… what would be the equivolent in Unity?

EDIT: figured out the IUnityContainer argument… however, still curious about the seconds part… dependencies

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T04:55:58+00:00Added an answer on May 21, 2026 at 4:55 am

    as you have figured out, the type you should have your modules depend on to IUnityContainer. You don’t really have to register the container with itself in order to be able to work with it in the modules (while you can do it if you wanted, and to make things clearer). And last, module dependencies are independent from the IoC container you’re using, so it should work just fine. You can as well configure the ModuleCatalog from xaml using:

    protected override IModuleCatalog CreateModuleCatalog()
    {
        return ModuleCatalog.CreateFromXaml(new Uri("catalog.xaml", UriKind.Relative));
    }
    

    and in the catalog.xaml file, you can specify the dependencies using the DependsOn property of the ModuleInfo.

    hope this helps 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently converted a subversion repo, which had been converted from cvs before that
We have an existing (old) codeline that we have recently converted from VC6 to
I have bean that i recently converted over from being a managed-bean to being
I have a report, which was recently converted from SSRS2005 to SSRS2208. The report
I recently converted a site from asp to CF. Unfortunately, alot of the old
We have quite Large Web Based System, which is recently converted from Website to
i converted recently from wxpython to pyqt and im still facing alot of problems
I recently converted my solution from Visual Studio 2008 to 2010, hoping I would
I've recently converted an app from .net 2.0 to 3.5 but I don't see
Ok, so we recently converted from SVN to Mercurial. We are using TortoiseHG normally.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.