Question

I would like to use my mvvmcross plugins in a Console app (it is for generating some data that uses shared libraries with my client apps). However, it is not clear to me how I can call Setup. In tests before I was using MvxIoCSupportingTest.

Was it helpful?

Solution

There is a console branch of MvvmCross which can be used to develop apps - https://github.com/MvvmCross/MvvmCross/tree/v3.1/Cirrious/Cirrious.MvvmCross.Console - and this includes a setup class https://github.com/MvvmCross/MvvmCross/blob/v3.1/Cirrious/Cirrious.MvvmCross.Console/Platform/MvxConsoleSetup.cs. However, realistically, this console platform is not a "real" target for MvvmCross - it has only ever really been used for test/demo. One example console app is in the old TwitterSearch code (https://github.com/MvvmCross/MvvmCross-Tutorials/tree/master/Sample%20-%20TwitterSearch/TwitterSearch.UI.Console) - although sadly that Twitter Search Api is no longer available.

If you don't want views/viewmodels - if you just want core IoC and plugin functionality, then this functionality only requires CrossCore and you should be able to write your own mini-setup for CrossCore in your console app, similar to the "CrossLight" approach (see N=30 and N=39 in http://mvvmcross.blogspot.com/)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top