本文整理汇总了C#中TvDatabase.TvBusinessLayer.GetChannelByTuningDetail方法的典型用法代码示例。如果您正苦于以下问题:C# TvBusinessLayer.GetChannelByTuningDetail方法的具体用法?C# TvBusinessLayer.GetChannelByTuningDetail怎么用?C# TvBusinessLayer.GetChannelByTuningDetail使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TvDatabase.TvBusinessLayer
的用法示例。
在下文中一共展示了TvBusinessLayer.GetChannelByTuningDetail方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PersistPortalChannel
private static void PersistPortalChannel(PortalChannel pChannel)
{
TvBusinessLayer layer = new TvBusinessLayer();
Channel dbPortalChannel = layer.GetChannelByTuningDetail(pChannel.NetworkId, pChannel.TransportId,
pChannel.ServiceId);
if (dbPortalChannel == null)
{
Log.Info("Portal channel with networkId={0}, transportId={1}, serviceId={2} not found", pChannel.NetworkId,
pChannel.TransportId, pChannel.ServiceId);
return;
}
Gentle.Framework.Broker.Execute("delete from ChannelLinkageMap WHERE idPortalChannel=" + dbPortalChannel.IdChannel);
foreach (LinkedChannel lChannel in pChannel.LinkedChannels)
{
Channel dbLinkedChannnel = layer.GetChannelByTuningDetail(lChannel.NetworkId, lChannel.TransportId,
lChannel.ServiceId);
if (dbLinkedChannnel == null)
{
Log.Info("Linked channel with name={0}, networkId={1}, transportId={2}, serviceId={3} not found",
lChannel.Name, lChannel.NetworkId, lChannel.TransportId, lChannel.ServiceId);
continue;
}
dbLinkedChannnel.DisplayName = lChannel.Name;
dbLinkedChannnel.Persist();
ChannelLinkageMap map = new ChannelLinkageMap(dbPortalChannel.IdChannel, dbLinkedChannnel.IdChannel,
lChannel.Name);
map.Persist();
}
}
示例2: FilterOutEPGChannel
/// <summary>
/// checks if a received EPGChannel should be filtered from the resultlist
/// </summary>
/// <value></value>
protected override bool FilterOutEPGChannel(EpgChannel epgChannel)
{
TvBusinessLayer layer = new TvBusinessLayer();
if (layer.GetSetting("generalGrapOnlyForSameTransponder", "no").Value == "yes")
{
DVBBaseChannel chan = epgChannel.Channel as DVBBaseChannel;
Channel dbchannel = layer.GetChannelByTuningDetail(chan.NetworkId, chan.TransportId, chan.ServiceId);
DVBTChannel dvbtchannel = new DVBTChannel();
if (dbchannel == null)
{
return false;
}
foreach (TuningDetail detail in dbchannel.ReferringTuningDetail())
{
if (detail.ChannelType == 4)
{
dvbtchannel.Frequency = detail.Frequency;
dvbtchannel.BandWidth = detail.Bandwidth;
}
}
return this.CurrentChannel.IsDifferentTransponder(dvbtchannel);
}
else
return false;
}
示例3: FilterOutEPGChannel
/// <summary>
/// checks if a received EPGChannel should be filtered from the resultlist
/// </summary>
/// <value></value>
protected override bool FilterOutEPGChannel(EpgChannel epgChannel)
{
TvBusinessLayer layer = new TvBusinessLayer();
if (layer.GetSetting("generalGrapOnlyForSameTransponder", "no").Value == "yes")
{
DVBBaseChannel chan = epgChannel.Channel as DVBBaseChannel;
Channel dbchannel = layer.GetChannelByTuningDetail(chan.NetworkId, chan.TransportId, chan.ServiceId);
DVBSChannel dvbschannel = new DVBSChannel();
if (dbchannel == null)
{
return false;
}
foreach (TuningDetail detail in dbchannel.ReferringTuningDetail())
{
if (detail.ChannelType == 3)
{
dvbschannel.Frequency = detail.Frequency;
dvbschannel.Polarisation = (Polarisation)detail.Polarisation;
dvbschannel.ModulationType = (ModulationType)detail.Modulation;
dvbschannel.SatelliteIndex = detail.SatIndex;
dvbschannel.InnerFecRate = (BinaryConvolutionCodeRate)detail.InnerFecRate;
dvbschannel.Pilot = (Pilot)detail.Pilot;
dvbschannel.Rolloff = (RollOff)detail.RollOff;
dvbschannel.DisEqc = (DisEqcType)detail.Diseqc;
}
}
return this.CurrentChannel.IsDifferentTransponder(dvbschannel);
}
else
return false;
}
示例4: FilterOutEPGChannel
/// <summary>
/// checks if a received EPGChannel should be filtered from the resultlist
/// </summary>
/// <value></value>
protected override bool FilterOutEPGChannel(EpgChannel epgChannel)
{
TvBusinessLayer layer = new TvBusinessLayer();
if (layer.GetSetting("generalGrapOnlyForSameTransponder", "no").Value == "yes")
{
DVBBaseChannel chan = epgChannel.Channel as DVBBaseChannel;
Channel dbchannel = layer.GetChannelByTuningDetail(chan.NetworkId, chan.TransportId, chan.ServiceId);
ATSCChannel atscchannel = new ATSCChannel();
if (dbchannel == null)
{
return false;
}
foreach (TuningDetail detail in dbchannel.ReferringTuningDetail())
{
if (detail.ChannelType == 1)
{
atscchannel.MajorChannel = detail.MajorChannel;
atscchannel.MinorChannel = detail.MinorChannel;
atscchannel.PhysicalChannel = detail.ChannelNumber;
}
}
return this.CurrentChannel.IsDifferentTransponder(atscchannel);
}
else
return false;
}