< Summary

Information
Class: SwitchBlade.Services.NullUiaWorkerClient
Assembly: SwitchBlade
File(s): D:\a\switchblade\switchblade\Services\NullUiaWorkerClient.cs
Tag: 203_23722840422
Line coverage
100%
Covered lines: 8
Uncovered lines: 0
Coverable lines: 8
Total lines: 33
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
ScanStreamingAsync()100%11100%
ScanAsync(...)100%11100%
Dispose()100%11100%

File(s)

D:\a\switchblade\switchblade\Services\NullUiaWorkerClient.cs

#LineLine coverage
 1using System.Collections.Generic;
 2using System.Threading;
 3using System.Threading.Tasks;
 4using SwitchBlade.Contracts;
 5
 6namespace SwitchBlade.Services
 7{
 8    /// <summary>
 9    /// No-op implementation of IUiaWorkerClient used in tests and when
 10    /// no UIA providers are registered. Returns empty results.
 11    /// </summary>
 12    internal sealed class NullUiaWorkerClient : IUiaWorkerClient
 13    {
 14        public async IAsyncEnumerable<UiaPluginResult> ScanStreamingAsync(
 15            IEnumerable<string>? disabledPlugins = null,
 16            IEnumerable<string>? excludedProcesses = null,
 17            [System.Runtime.CompilerServices.EnumeratorCancellation] CancellationToken cancellationToken = default)
 118        {
 119            await Task.CompletedTask;
 120            yield break;
 121        }
 22
 23        public Task<List<WindowItem>> ScanAsync(
 24            IEnumerable<string>? disabledPlugins = null,
 25            IEnumerable<string>? excludedProcesses = null,
 26            CancellationToken cancellationToken = default)
 127        {
 128            return Task.FromResult(new List<WindowItem>());
 129        }
 30
 231        public void Dispose() { }
 32    }
 33}