public void EnableTestTelemetryChannel()
        {
            InvokeOnUIThread(cancellationToken =>
            {
                TelemetryService.DetachTestChannel(LoggerTestChannel.Instance);

                LoggerTestChannel.Instance.Clear();

                TelemetryService.AttachTestChannel(LoggerTestChannel.Instance);
            });
        }
Example #2
0
        internal async Task <TelemetryVerifier> EnableTestTelemetryChannelAsync(CancellationToken cancellationToken)
        {
            await JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);

            TelemetryService.DetachTestChannel(LoggerTestChannel.Instance);

            LoggerTestChannel.Instance.Clear();

            TelemetryService.AttachTestChannel(LoggerTestChannel.Instance);

            return(new TelemetryVerifier(TestServices));
        }