private void AddMovie(IMediaLibrary library, IEventAggregator eventAggregator) { var movie = new Movie { Title = this.Title, ReleaseDate = DateTime.Now }; library.Add(movie); eventAggregator.Raise<IMovieAdded>(evt => evt.Movie = movie); }
/// <summary> /// Adds a movie and raises an event /// </summary> /// <param name="library"></param> /// <param name="eventAggregator"></param> private void AddMovie(IMediaLibrary library, IEventAggregator eventAggregator) { var movie = new Movie { Title = this.Title, ReleaseDate = DateTime.Now }; library.Add(movie); eventAggregator.Raise <IMovieAdded>(evt => evt.Movie = movie); }