Stupid question about IoC

Topics: Bootstrappers & IoC
Jan 26, 2012 at 11:15 AM

Hello,

Consider this case

public class Presenter : PresenterBase

  {

      [ImportingConstructor]

      public Presenter(CompositionContainer compositionContainer, IViewModelFactory viewModelFactory)

{...}

}

 

public class PresenterBase : IModuleMenuItem

   {

}

 

if in my PresenterBase I need to import IViewLocator should I declare it in the Presenter and pass it as base(...)?

 

Why in your example on the imported class you define

[Import] ?

 

Thanks

Coordinator
Jan 26, 2012 at 5:15 PM

Which example are you referring to?