addPairConsumerFrom<TargetInterfaceType extends PairInterface, SourceInterfaceType extends PairInterface> method
- TargetInterfaceType target,
- PairConsumer<
SourceInterfaceType> source, { - String uniquify(
- String original
inherited
Registers target against a consumer source endpoint and returns it.
This is the type-safe equivalent of addPairInterfaceFrom with PairRole.consumer. It supports deliberate type adaptation in the same way as addPairInterfaceFrom.
Implementation
TargetInterfaceType addPairConsumerFrom<
TargetInterfaceType extends PairInterface,
SourceInterfaceType extends PairInterface>(
TargetInterfaceType target,
PairConsumer<SourceInterfaceType> source, {
String Function(String original)? uniquify,
}) =>
addPairInterfaceFrom(
target,
source.interface,
PairRole.consumer,
uniquify: uniquify,
);