public static string createAndPlay(this VideoSourcePlayer videoPlayer, List <string> pathToImages) { "in VideoSourcePlayer createAndPlay, creating a video from {0} WPF images".info(pathToImages.size()); var aforgeVideo = new API_AForge_Video(); aforgeVideo.add_Images(pathToImages); aforgeVideo.saveAndClose(); videoPlayer.play(aforgeVideo.PathToAviVideo); return(aforgeVideo.PathToAviVideo); }