public Adapter SelectAdapter() { if (!_zoneIntervals.IsAvailable()) { Event.EventManager.sendMediationCappedEvent(Engine.Instance.AppId, Id, null, _zoneIntervals.NextAvailable()); } if (IsReady()) { Adapter adapter = _adapterManager.SelectAdapter(); if (adapter == null) { Utils.Log(@"Adapter adapter = _adapterManager.SelectAdapter(); if(adapter == null) { return null; }"); return(null); } Utils.Log("Consuming ad slot for zone " + Id); _zoneIntervals.Consume(); if (_zoneIntervals.IsEmpty()) { Utils.Log("Zone " + Id + " ad interval list empty"); ConfigManager.Instance.RequestAdSources(); } return(adapter); } Utils.Log(@"SelectAdapter return null;"); return(null); }
private HashSet <string> NonCappedAdapters() { HashSet <string> nonCappedAdapters = new HashSet <string>(); foreach (KeyValuePair <string, IntervalManager> entry in _adapterIntervals) { IntervalManager adapterIntervals = entry.Value; if (adapterIntervals.IsAvailable()) { nonCappedAdapters.Add(entry.Key); } } return(nonCappedAdapters); }