public MainVM(IRssHelper rssHelper) { this.rssHelper = rssHelper; Items = new ObservableCollection <Item>(); ReadRss(); }
public MainVM(IRssHelper rssHelper) { /*Note like the constructor receive an interface type * The kind of instance (implementing that interface) will be resolved in MainWindow.xaml.cs that is where * the MainVM is first called or resolved like a dependency...And will be resolved depending on * the kind of type registered at app.xaml.cs*/ this.rssHelper = rssHelper; Items = new ObservableCollection <Item>(); ReadRss(); }