Example #1
0
        /// <summary>
        /// Returns a tree of channels and contained clients by calling GetChannelList() and GetClientList() on QueryRunner when useCachedData is set to false. Otherwise the data retrieved by previous calls is used.
        /// </summary>
        /// <param name="useCachedData">whether to use cached data from previous calls or to query the data again to get fresh data</param>
        /// <returns></returns>
        public List <ChannelTreeItem> GetChannelTree(bool useCachedData)
        {
            if (!useCachedData || CachedChannelList == null || CachedClientList == null)
            {
                CachedChannelList = QueryRunner.GetChannelList(true).Values;
                CachedClientList  = QueryRunner.GetClientList(true).Values;
            }

            return(GetChannelTree(CachedChannelList, CachedClientList));
        }
Example #2
0
        /// <summary>
        /// Gets the channel list.
        /// </summary>
        /// <returns></returns>
        public List <ChannelListEntry> GetChannelList()
        {
            lock (Container.lockGetChannelList)
            {
                if (Container.ChannelList == null)
                {
                    Container.ChannelList = QueryRunner.GetChannelList(true, true, false, false, false).Where(m => !m.IsSpacer).ToList();
                }

                return(Container.ChannelList.ToList());
            }
        }