private void GetChannelData() { YouTubeDataSource yds = DroneDataSource as YouTubeDataSource; if (!Object.Equals(null, yds)) { foreach (Competitor account in yds.GetCompetitorAccounts()) { if (!String.IsNullOrEmpty(account.YouTubeAccount)) { ChannelManager cManager = new ChannelManager(new KeyValuePair <int, string>(account.ID, account.YouTubeAccount) , Utility.ApplicationName , XMLUtility.GetTextFromAccountNode(Xml, "token/devkey")); Channel chan = cManager.GetUserChannel(); if (!Object.Equals(chan, null)) { YouTubeDataComponent ydc = new YouTubeDataComponent(); ydc.YouTubeChannel = chan; DroneDataSource.Process(ydc); } else { Utility.WriteToLogFile(String.Format("YouTube_ChannelNull_{0:M_d_yyyy}", DateTime.Today) + ".log", "No account info for: " + account.YouTubeAccount); } } } } }
public QueueYouTube() : base() { QueueComponentDataSource = new YouTubeDataSource(); }
public YouTube() : base() { DroneDataSource = new YouTubeDataSource(); }