public PackageAdTrigger(AdPod pod, string HandlerId, TimeSpan StartTime) { Id = Guid.NewGuid().ToString(); Description = string.Empty; Source = new PackageAdSource(pod) { Format = HandlerId }; this.StartTime = StartTime; }
public PackageAdSource(AdPod pod) { m_adpod = pod; }
/// <summary> /// Checks a pod to see if there is any ad with no error and at least one video asset. /// </summary> /// <param name="pod">The pod to check</param> /// <returns>True if the pod has a valid ad</returns> private bool PodHasValidAd(AdPod pod) { bool validPod = false; foreach (var adPackage in pod.AdPackages) { if (adPackage.Error == null && adPackage.VideoResources.Count > 0) { validPod = true; break; } } return validPod; }