protected override Func <TMessage> FindSender(IOutlet <TMessage> outletReceivingMessage) { var senders = Inlets.Select((inlet, index) => new Tuple <int, Func <TMessage> >(index, inlet.FindSender())).Where(t => t.Item2 != null).ToList(); if (!senders.Any()) { return(null); } var result = TieBreaker.ResolveTie(senders.Select(s => s.Item1)); return(senders.Single(s => s.Item1 == result).Item2); }
/// <summary> /// TBD /// </summary> /// <returns>TBD</returns> public override Shape DeepCopy() => new AmorphousShape(Inlets.Select(i => i.CarbonCopy()).ToImmutableArray(), Outlets.Select(o => o.CarbonCopy()).ToImmutableArray());