MoviesDirectedBy() публичный Метод

Returns a list of those movies directed by the supplied director
public MoviesDirectedBy ( string director ) : Spring.IocQuickStart.MovieFinder.Movie[]
director string /// The name of the director whose movies we are to return. ///
Результат Spring.IocQuickStart.MovieFinder.Movie[]
Пример #1
0
        public static void Main()
        {
            try
            {
                IApplicationContext ctx = ContextRegistry.GetContext();

                #region Advanced: Call alternative ways to create application context
                //CreateContextMixXmlAndProgrammatic();
                //CreateContextProgrammatically();
                //CreateContextProgrammaticallyWithAutoWire();
                #endregion

                MovieLister lister = (MovieLister)ctx.GetObject("MyMovieLister");
                Movie[]     movies = lister.MoviesDirectedBy("Roberto Benigni");
                LOG.Debug("Searching for movie...");
                foreach (Movie movie in movies)
                {
                    LOG.Debug(
                        string.Format("Movie Title = '{0}', Director = '{1}'.",
                                      movie.Title, movie.Director));
                }
                LOG.Debug("MovieApp Done.");
            }
            catch (Exception e)
            {
                LOG.Error("Movie Finder is broken.", e);
            }
            finally
            {
                Console.WriteLine();
                Console.WriteLine("--- hit <return> to quit ---");
                Console.ReadLine();
            }
        }
        public static void Main()
        {
            try
            {
                IApplicationContext ctx = ContextRegistry.GetContext();

                MovieLister lister = ctx.GetObject <MovieLister>();
                Movie[]     movies = lister.MoviesDirectedBy("Roberto Benigni");
                LOG.Debug("Searching for movie...");
                foreach (Movie movie in movies)
                {
                    LOG.Debug(
                        string.Format("Movie Title = '{0}', Director = '{1}'.",
                                      movie.Title, movie.Director));
                }
                LOG.Debug("MovieApp Done.");
            }
            catch (Exception e)
            {
                LOG.Error("Movie Finder is broken.", e);
            }
            finally
            {
                Console.WriteLine();
                Console.WriteLine("--- hit <return> to quit ---");
                Console.ReadLine();
            }
        }