Example #1
0
        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);
                        }
                    }
                }
            }
        }
Example #2
0
 public QueueYouTube()
     : base()
 {
     QueueComponentDataSource = new YouTubeDataSource();
 }
Example #3
0
 public YouTube()
     : base()
 {
     DroneDataSource = new YouTubeDataSource();
 }