PairInterface constructor

PairInterface(
  1. {List<Port>? portsFromConsumer,
  2. List<Port>? portsFromProvider,
  3. List<Port>? sharedInputPorts,
  4. String modify(
    1. String original
    )?}
)

Constructs an instance of a PairInterface with the specified ports.

The modify function will allow modification of all port names, in addition to the usual uniquification that can occur during connectIO.

Implementation

PairInterface({
  List<Port>? portsFromConsumer,
  List<Port>? portsFromProvider,
  List<Port>? sharedInputPorts,
  this.modify,
}) {
  if (portsFromConsumer != null) {
    setPorts(portsFromConsumer, [PairDirection.fromConsumer]);
  }
  if (portsFromProvider != null) {
    setPorts(portsFromProvider, [PairDirection.fromProvider]);
  }
  if (sharedInputPorts != null) {
    setPorts(sharedInputPorts, [PairDirection.sharedInputs]);
  }
}