In the Prism Commanding_Desktop QuickStart solution, in the OrderModule, it defines a variable to the following:
this.container.Resolve<OrdersEditorPresentationModel>()
but where is this being registered so that it can be "resolved" out of the container? I see below where OrdersRepository is being registered, but I find no where in the project where OrdersEditorPresentationModel is being registered.
OrderModule.cs:
public void Initialize()
{
this.container.RegisterType<IOrdersRepository, OrdersRepository>(new ContainerControlledLifetimeManager());
OrdersEditorPresentationModel presentationModel = this.container.Resolve<OrdersEditorPresentationModel>();
...
}
OrdersEditorPresentationModel.cs:
public class OrdersEditorPresentationModel : INotifyPropertyChanged
{
...
public OrdersEditorPresentationModel(OrdersEditorView view, IOrdersRepository ordersRepository, OrdersCommandProxy commandProxy)
{
this.ordersRepository = ordersRepository;
this.commandProxy = commandProxy;
this.Orders = new ObservableCollection<OrderPresentationModel>();
this.PopulateOrders();
this.View = view;
view.Model = this;
}
...
The constructor in the type being resolved above has a particular signature, but where is this signature being defined:
public OrdersEditorPresentationModel(OrdersEditorView view,
IOrdersRepository ordersRepository,
OrdersCommandProxy commandProxy)
I would think it might be some default signature, but another example in the Prism documentation, a presenter constructor has a different signature:
public EmployeesPresenter(IEmployeesView view,
IEmployeesListPresenter listPresenter,
IEmployeesController employeeController)