LCOV - code coverage report

Current view
top level - /src - local_worker_client.dart
Test
lcov.info
Date
2022-04-02
Legend
Lines
hit
not hit
Branches
taken
not taken
# not executed
HitTotalCoverage
Lines55100.0%
Functions00-
Branches00-
Each row represents a line of source code
LineBranchHitsSource code
1import 'channel.dart';
2import 'local_worker.dart';
3import 'worker_request.dart';
4import 'worker_service.dart';
5
6/// Base class used to communicate with a [LocalWorker].
7///
8/// Typically, derived classes should add proxy methods sending [WorkerRequest]s to the worker.
9class LocalWorkerClient implements WorkerService {
10 /// Create a client for a [LocalWorker]. The [channel] passed to this client must have been obtained by
11 /// calling [Channel.share] on the [LocalWorker.channel].
121 LocalWorkerClient(this.channel);
13
14 /// The [Channel] to communicate with the [LocalWorker].
15 final Channel channel;
16
17 /// Sends a command to the [LocalWorker].
181 Future<T> send<T>(int command, List args) =>
192 channel.sendRequest<T>(command, args);
20
21 /// Sends a streaming command to the [LocalWorker].
221 Stream<T> stream<T>(int command, List args) =>
232 channel.sendStreamingRequest<T>(command, args);
24
25 /// Local worker clients do not need an [operations] map.
26 @override
27 final Map<int, CommandHandler> operations = WorkerService.noOperations;
28}
Choose Features