Hi all,
I really hope that BCL team can provide a Best practice on this topic! 
I try to answer my questions in the last post and wait for your comments.
I am working with managed add-in framework now. I want to exposethe object model by MAF. But, I am lost totally. 
There are some collections in existing model and these collections can drop into 3 categories:
1. normal collection (can be modified, most of them are System.Collections.Generic.List<T>);
2. readonly collection (can not ne modified, they are System.Collections.ObjectModel.ReadOnlyCollection<T>);
3. a class inherit form IEnumerable<T>.
Collections incategory 1 can be replaced byIListContract<T>, But How about category 2 and 3?
I wonder whether I can express ReadonlyCollection in MAF.
Here are my questions:
-
I found that there are two classes named IListContract<T>. One is under System.AddIn.Contract and other is under System.AddIn.Contract.Collections? What is the difference between 2 classes?
-
How to express ReadOnly collections in MAF? Here is my guess: use ReadonlyCollection<T> in View and IListContract<T>, and in adapter do following convertion (From View to Contract, e.g.):
But does it bring more performace issues? have somebody done it before? CollectionAdapters can only take care of IList and IListContract. 