public SubscriberViewModel(Subscriber subscriber, SubscriberService subscriberService) { if (subscriber == null) throw new ArgumentNullException("subscriber"); if (subscriberService == null) throw new ArgumentNullException("subscriberService"); _subscriber = subscriber; _subscriberService = subscriberService; }
public SubscriberListViewModel(SubscriberService service) { DisplayName = Resources.SubscriberList_DisplayName; if (service == null) { throw new ArgumentNullException("Invalid service"); } _subscriberService = service; _subscriberService.SubscriberAdded += this.OnSubscriberAddedToRepository; _subscriberService.SubscriberDeleted += this.OnSubscriberDeletedFromRepository; LoadSubscribers(); }