public Uri GetMockVideoUri(string videoId) { var ds = new MockDataService(); Uri result = null; var completion = new ManualResetEvent(false); ds.GetYoutubeVideoUri(videoId, (youTubeUri, err) => { result = youTubeUri; completion.Set(); }); completion.WaitOne(); return result; }
public PlaylistData GetMockPlaylistData() { var ds = new MockDataService(); PlaylistData result = null; var completion = new ManualResetEvent(false); ds.GetBBCPlaylistData((playlistData, err) => { result = playlistData; completion.Set(); }); completion.WaitOne(); return result; }
public IList<VideoInfo> GetMockVideoInfo(PlaylistData playlistData) { var ds = new MockDataService(); var completion = new ManualResetEvent(false); IList<VideoInfo> result = null; ds.GetVideoInfo(playlistData, (videoInfo, err) => { result = videoInfo; completion.Set(); }); completion.WaitOne(); return result; }