private int GetImpressionRefreshRate(ImpressionsMode impressionsMode, int?impressionsRefreshRate) { switch (impressionsMode) { case ImpressionsMode.Debug: return(impressionsRefreshRate == null || impressionsRefreshRate <= 0 ? 60 : impressionsRefreshRate.Value); case ImpressionsMode.Optimized: default: return(impressionsRefreshRate == null || impressionsRefreshRate <= 0 ? 300 : Math.Max(60, impressionsRefreshRate.Value)); } }
public ImpressionsManager(IImpressionsLog impressionsLog, IImpressionListener customerImpressionListener, IImpressionsCounter impressionsCounter, bool addPreviousTime, ImpressionsMode impressionsMode, IImpressionsObserver impressionsObserver = null) { _impressionsLog = impressionsLog; _customerImpressionListener = customerImpressionListener; _impressionsCounter = impressionsCounter; _addPreviousTime = addPreviousTime; _optimized = impressionsMode == ImpressionsMode.Optimized && addPreviousTime; _impressionsObserver = impressionsObserver; }
public ImpressionsManager(IImpressionsLog impressionsLog, IImpressionListener customerImpressionListener, IImpressionsCounter impressionsCounter, bool addPreviousTime, ImpressionsMode impressionsMode, ITelemetryRuntimeProducer telemetryRuntimeProducer, ITasksManager taskManager, IImpressionsObserver impressionsObserver = null) { _impressionsLog = impressionsLog; _customerImpressionListener = customerImpressionListener; _impressionsCounter = impressionsCounter; _addPreviousTime = addPreviousTime; _optimized = impressionsMode == ImpressionsMode.Optimized && addPreviousTime; _impressionsObserver = impressionsObserver; _telemetryRuntimeProducer = telemetryRuntimeProducer; _taskManager = taskManager; }