public void SetUrl(string videoId, string title, long length)
 {
     if (UrlCaches.ContainsKey(videoId)) {
         var item = UrlCaches[videoId];
         item.Length = length;
         item.Title = title;
     } else {
         var cache = new UrlCache { Length = length, Title = title, VideoId = videoId };
         _urlCaches.Add(cache);
         UrlCaches.Add(cache.VideoId, cache);
     }
 }
예제 #2
0
 public void SetUrl(string videoId, string title, long length)
 {
     if (UrlCaches.ContainsKey(videoId))
     {
         var item = UrlCaches[videoId];
         item.Length = length;
         item.Title  = title;
     }
     else
     {
         var cache = new UrlCache {
             Length = length, Title = title, VideoId = videoId
         };
         _urlCaches.Add(cache);
         UrlCaches.Add(cache.VideoId, cache);
     }
 }