예제 #1
0
        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);
        }
예제 #2
0
        /// <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);
        }