Exemple #1
0
        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;

        }
Exemple #2
0
        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;
        }
Exemple #3
0
        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;
        }