Esempio n. 1
0
        public bool IsEnabled()
        {
            var options = _integrationOptionsProvider.GetOptions();
            var isSpecFlowTelemetryEnabled = _environmentSpecFlowTelemetryChecker.IsSpecFlowTelemetryEnabled();

            return(!options.OptOutDataCollection && isSpecFlowTelemetryEnabled);
        }
Esempio n. 2
0
        public async Task <IResult> TransmitEvent(IAnalyticsEvent analyticsEvent)
        {
            if (!_environmentSpecFlowTelemetryChecker.IsSpecFlowTelemetryEnabled())
            {
                return(Result.Success());
            }

            return(await _analyticsTransmitterSink.TransmitEvent(analyticsEvent));
        }
        public async Task TransmitEvent(IAnalyticsEvent analyticsEvent, string userId)
        {
            if (!_environmentSpecFlowTelemetryChecker.IsSpecFlowTelemetryEnabled())
            {
                return;
            }

            try
            {
                await TransmitEventAsync(analyticsEvent, userId);
            }
            catch (Exception e)
            {
                _logger.Verbose(e);
            }
        }
Esempio n. 4
0
        public void TransmitSpecflowProjectCompilingEvent(SpecFlowProjectCompilingEvent projectCompilingEvent)
        {
            try
            {
                if (!_environmentSpecFlowTelemetryChecker.IsSpecFlowTelemetryEnabled())
                {
                    return;
                }

                _analyticsTransmitterSink.TransmitEvent(projectCompilingEvent);
            }
            catch (Exception)
            {
                //nope
            }
        }
Esempio n. 5
0
        private void TransmitEvent(IAnalyticsEvent analyticsEvent)
        {
            try
            {
                if (!_environmentSpecFlowTelemetryChecker.IsSpecFlowTelemetryEnabled())
                {
                    return;
                }

                _analyticsTransmitterSink.TransmitEvent(analyticsEvent);
            }
            catch (Exception)
            {
                //nope
            }
        }