ArgusTV.Recorder.MediaPortalTvServer.TvServerPlugin.EnsureGuideChannelForDvbEpg C# (CSharp) Метод

EnsureGuideChannelForDvbEpg() приватный статический Метод

private static EnsureGuideChannelForDvbEpg ( SchedulerServiceAgent tvSchedulerAgent, GuideServiceAgent tvGuideAgent, ArgusTV.DataContracts.Channel channel, TvDatabase mpChannel ) : void
tvSchedulerAgent SchedulerServiceAgent
tvGuideAgent GuideServiceAgent
channel ArgusTV.DataContracts.Channel
mpChannel TvDatabase
Результат void
        private static void EnsureGuideChannelForDvbEpg(SchedulerServiceAgent tvSchedulerAgent, GuideServiceAgent tvGuideAgent, Channel channel, TvDatabase.Channel mpChannel)
        {
            if (!channel.GuideChannelId.HasValue)
            {
                string externalId = mpChannel.ExternalId;
                if (String.IsNullOrEmpty(externalId))
                {
                    externalId = mpChannel.DisplayName;
                }
                channel.GuideChannelId = tvGuideAgent.EnsureChannel(externalId, mpChannel.DisplayName, channel.ChannelType);
                tvSchedulerAgent.AttachChannelToGuide(channel.ChannelId, channel.GuideChannelId.Value);
            }
        }