public MovieLister() { _finder = new ImdbMovieFinder(); }
public MovieListerWithLogging(IMovieFinder movieFinder, ILogger logger) { this.movieFinder = movieFinder; this.logger = logger; }
public MovieLister(IMovieFinder finder) { this.finder = finder; }
public MovieLister() { finder = new XmlMovieFinder("Movies.xml"); }
public MovieLister(IMovieFinder movieFinder) { this.movieFinder = movieFinder; }
public MovieLister() { _finder = ServiceLocator.Locate<IMovieFinder>(); }
//增加了构造函数,参数是IMovieFinder对象 public MPGMovieLister(IMovieFinder movieFinder) { _movieFinder = movieFinder; }
public MovieLister(IMovieFinder finder) { _finder = finder; }
public MovieService() { _movieFinder = new MemMovieFinder(); }
public MovieLister(IMovieFinder movieFinder) { _movieFinder = movieFinder; }
public MovieLister(IMovieFinder movieFinder) { this.movieFinder = movieFinder ?? throw new ArgumentNullException(nameof(movieFinder)); }