public NavigationViewModel(IFriendLookupDataService friendLookupService, IEventAggregator eventAggregator) { _friendLookupService = friendLookupService; _eventAggregator = eventAggregator; Friends = new ObservableCollection <NavigationItemViewModel>(); _eventAggregator.GetEvent <AfterFriendSavedEvent>().Subscribe(AfterFriendSaved); }
public NavigationViewModel(IFriendLookupDataService friendLookupService, IEventAggregator eventAggregator) { _friendLookupService = friendLookupService; Friends = new ObservableCollection <LookupItem>(); _eventAggregator = eventAggregator; }
public NavigationViewModel(IFriendLookupDataService friendLookupService, IMeetingLookupDataService meetingLookupService, IEventAggregator eventAggregator) { _friendLookupService = friendLookupService; _meetingLookupService = meetingLookupService; _eventAggregator = eventAggregator; Friends = new ObservableCollection <NavigationItemViewModel>(); Meetings = new ObservableCollection <NavigationItemViewModel>(); _eventAggregator .GetEvent <AfterDetailSavedEvent>() .Subscribe( obj => { switch (obj.ViewModelName) { case nameof(FriendDetailViewModel): AfterDetailSaved(Friends, obj); break; case nameof(MeetingDetailViewModel): AfterDetailSaved(Meetings, obj); break; } }); _eventAggregator.GetEvent <AfterDetailDeletedEvent>().Subscribe(AfterDetailDeleted); }
public NavigationViewModel(IFriendLookupDataService _creator, IEventAggregator _eventAggregator) { creator = _creator; Friends = new ObservableCollection <NavigationItemViewModel>(); eventAggregator = _eventAggregator; eventAggregator.GetEvent <AfterFriendSaveEvent>().Subscribe(AfterFriendSave); }
public NavigationViewModel(IFriendLookupDataService friendLookupService, IEventAggregator eventAggregator, IMeetingLookupDataSevice meetingLookupService) { _friendLookupService = friendLookupService; _meetingLookupService = meetingLookupService; _eventAggragator = eventAggregator; Friends = new ObservableCollection <NavigationItemViewModel>(); Meetings = new ObservableCollection <NavigationItemViewModel>(); _eventAggragator.GetEvent <AfterDetailSavedEvent>().Subscribe(AfterDetailSaved); _eventAggragator.GetEvent <AfterDetailDeletedEvent>().Subscribe(AfterDetailDeleted); }
public NavigationViewModel(IFriendLookupDataService friendLookupDataService, IMeetingLookupDataService meetingLookupDataService, IEventAggregator eventAggregator) { _friendLookupDataService = friendLookupDataService; _meetingLookupDataService = meetingLookupDataService; _eventAggregator = eventAggregator; _eventAggregator.GetEvent <AfterDetailSavedEvent>().Subscribe(AfterDetailSaved); _eventAggregator.GetEvent <AfterDetailDeletedEvent>().Subscribe(AfterDetailDeleted); }
public FriendViewModel( IFriendLookupDataService friendLookupDataService, IEventAggregator eventAggregator) { _instanceCountVM++; _dataService = friendLookupDataService; _eventAggregator = eventAggregator; Friends = new ObservableCollection <NavigationItemViewModel>(); _eventAggregator.GetEvent <AfterDetailSavedEvent>() .Subscribe(AfterDetailSaved); _eventAggregator.GetEvent <AfterDetailDeletedEvent>() .Subscribe(AfterDetailDeleted); }
public NavigationViewModel(IFriendLookupDataService friendLookupService) { _friendLookupService = friendLookupService; Friends = new ObservableCollection <LookupItem>(); }