internal ChannelEx GetContentItemChannel(ContentItem item) { if ((item != null) && !string.IsNullOrEmpty(item.ID) && (Channels != null) && Channels.Any()) { string[] idParts = item.ID.Split(new string[] { "-" }, StringSplitOptions.RemoveEmptyEntries); if (idParts.Length > 0) { return(Channels.Cast <ChannelEx>().FirstOrDefault(c => c.ID == idParts[0])); } } return(null); }