This project is read-only.

Multiple Exports

May 18, 2013 at 12:47 PM

There are a function in MEF that I love.
List<importClass> items {get;set;}
Then you can do something like:
foreach( importClass item in items)
//do something on item.
Can you do this in StyleMvvm??

May 18, 2013 at 7:55 PM
Hi lg,

Currently the framework supports importing the following IList<T>, ICollection<T>, IEnumerable<T> where T is the interface type you are importing. The idea being that you want to import a set of items that all implement and export the same interface.

I'm going to implement the ability to import any generic object that implements the IList interface, meaning List<T>, ObservableCollection<T> etc. will be supported directly. I was thinking about doing a release in the next week and this would just be rolled in.

You can also import Lazy<T> similar to MEF. I've tried to implement most everything from MEF that I liked while trying to simplify and stream line the process, but if you find other things I've missed that you like let me know.

May 19, 2013 at 5:54 PM
Hi Lg,

Just as an FYI to you and anyone else that ends up reading this, I also decided to support ReadOnlyCollection<T> as well as IReadOnlyList<T> and IReadOnlyCollection<T>

This will all be released in version 2.3, either releasing today or later in the week depending on where I get with writing example code today.