private bool AnySupportFeature(AnalyticsFeatureType feature) { bool doesSupport = false; foreach (var m in _internalManagers) { doesSupport = doesSupport || m.SupportsFeature(feature); } return(doesSupport); }
private bool AllSupportFeature(AnalyticsFeatureType feature) { bool doesSupport = false; foreach (var m in _internalManagers) { if (!m.SupportsFeature(feature)) { return(false); } doesSupport = true; } return(doesSupport); }
/// <summary> /// Returns SupportsFeature of the contained manager /// </summary> /// <param name="feature"></param> /// <returns></returns> public bool SupportsFeature(AnalyticsFeatureType feature) { return(_analyticsManager.SupportsFeature(feature)); }
private void PerformForAll(IEnumerable <IAnalyticsManager> list, Action <IAnalyticsManager> action, AnalyticsFeatureType featureType) { bool didPerform = false; if (!IsStrict || AllSupportFeature(featureType)) { ForEach(list, m => { if (m.SupportsFeature(featureType)) { didPerform = true; action(m); } }); } if (!didPerform) { throw new NotImplementedException("No Analytic managers in this group support operation: " + featureType); } }
/// <summary> /// Tells if any of the contained managers in the group support this feature /// </summary> /// <param name="feature">Type of the analytics feature</param> /// <returns>true if one or more contained managers support the feature</returns> public bool SupportsFeature(AnalyticsFeatureType feature) { return(IsStrict ? AllSupportFeature(feature) : AnySupportFeature(feature)); }
/// <summary> /// Returns true if the manager supports the specified feature /// </summary> /// <param name="feature">AnalyticsFeatureType type</param> /// <returns>true if specified AnalyticsFeatureType is supported</returns> public virtual bool SupportsFeature(AnalyticsFeatureType feature) { return((feature & GetSupportedFeatures()) > 0); }