Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. public class A : IOrderable { }
  2.  
  3. public class B : IOrderable { }
  4.  
  5. public class Term
  6. {
  7. public ObservableCollection<A> aCollection { get; set; }
  8. }
  9.  
  10. public class Year
  11. {
  12. public ObservableCollection<B> bCollection { get; set; }
  13. }
  14.  
  15. public abstract class InfoListViewModelBase : ViewModelBase
  16. {
  17. public ObservableCollection<IOrderable> childModels { get; set; }
  18. }
  19.  
  20. public class TermViewModel : InfoListViewModelBase
  21. {
  22. public TermViewModel(Term t)
  23. {
  24. this.childModels = t.aCollection;
  25. }
  26. }
  27.  
  28. public class YearViewModel : InfoListViewModelBase
  29. {
  30. public TermViewModel(Year y)
  31. {
  32. this.childModels = y.bCollection;
  33. }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement