Example #1
0
        private IList <ChannelInfo> Get2ndProgramNumber(ChannelList list)
        {
            var channels = list.GetChannelByNewProgNr(2);

            if (channels.Count == 1)
            {
                return(channels);
            }

            var ch = list.Channels.OrderBy(c => c.NewProgramNr <= 0 ? 10000 : c.NewProgramNr).FirstOrDefault();

            if (ch == null)
            {
                return(null);
            }
            channels = new List <ChannelInfo>();
            channels.Add(ch);
            return(channels);
        }