コード例 #1
0
 public MainWindow()
 {
     InitializeComponent();
     this.SearchService     = new FreeTextSearchService();
     this.MovieService      = new MovieService();
     this.CastOrCrewService = new CastOrCrewService();
 }
コード例 #2
0
 public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
 {
     if (value.GetType() == typeof(CastOrCrew))
     {
         CastOrCrewService castOrCrewService = new CastOrCrewService();
         var movies = castOrCrewService.GetDirectedMovies((CastOrCrew)value);
         return(string.Join("\n", movies.Select(x => x.Title)));
     }
     return(null);
 }