Tuesday, January 15, 2013

Basic Q&A for Prism WPF


http://msdn.microsoft.com/en-us/library/ff921068%28v=pandp.40%29.aspx


What is Bootstarpper?

   Bootstrapper is a class  starts the shell. For example bootstrapper for an prism mef application
   which inherits from MefBootstrapper.


What is Module?

    Modules are classes that implement the IModule interface


How many ways modules can be registered?

   Modules can be registered from  -
  • Directly inside code
  • Using Configuration
  • Using Directory Inspection

Module Dependance

   Module can have dependency on other module. Prism provides module dependency management.


What is Container or Dependency Injection Container?

   Core Prism library is container agnostic. The following are examples of containers that are used as
   dependency injection containers in Prism.

  • ModularityWithMef
  • ModularityWithUnity 

What is region?

What is Export, Import attribute?

What is Module Catalog?

How do you register modules?
    Bootstrapper override CreateModuleCatalog and ConfigureModuleCatalog methods.


By default does MEF create singleton instance of objects?
   Yes, by default MEF creates singleton instance.

How to specify so that MEF does not create singleton instance?
    Decorate with attribute to indicate that the created instance is not shared.
    [PartCreationPolicy(CreationPolicy.NotShared)]

No comments:

Post a Comment