GameLibrary - Where does firstScreen come from in the shell constructor?

Topics: Extensibility
Dec 5, 2011 at 8:48 PM
Edited Dec 5, 2011 at 8:52 PM

I cannot figure out how this works.  When I try to do the same thing, I get an 'Inconsistent accessibility' error.  What is with the "[ImportingConstructor]" on ShellViewModel?  Where are those NoResults and Results VMs coming from?


I am trying to make my own project mimicking the GameLibrary.  I went to work on the SearchViewModel and so on, but I noticed in QueryResult.cs the Backend was never piped through, so it crashed.  So I tried to fake it by instantiating a new one in the Execute method of QueryResult.  Now that is happy and my BackEnd grabs some SQLite data and returns it to my SearchViewModel and I would like to get the 'results' wired up, but I see that is passed in the constructor and I am mystified like whoa!  Also, I noticed that my results.response does not have a .count like the GameLibrary does over in SearchViewModel's ExecuteSearch, what could that be?


I think it boils down to the decorators and composition magic, sooo I am gonna file this under 'extensibility'..

how clueless am I?

Dec 7, 2011 at 5:46 PM
Edited Dec 7, 2011 at 5:46 PM

So I am gonna go out on a limb and say you have had much exposure to MEF?  [ImportConstructor] is an attribute directly related MEF, and allows for Dependency Injection/Inversion of Control

Also you may want to read up on CoRoutines, they are used extensively in that example, and yield the NoResults/Results objects.

As for the Count property we would have to see some code to see how you are wiring your vm's.