コード例 #1
0
        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);
        }
コード例 #2
0
ファイル: Shape.cs プロジェクト: yildizoglu/akka.net
 /// <summary>
 /// TBD
 /// </summary>
 /// <returns>TBD</returns>
 public override Shape DeepCopy()
 => new AmorphousShape(Inlets.Select(i => i.CarbonCopy()).ToImmutableArray(), Outlets.Select(o => o.CarbonCopy()).ToImmutableArray());