Example #1
0
 private void WhenConnect(IPeer peer, ConnectAction action)
 {
     if (peer.IsConnectedTo(action.Model))
     {
         return;
     }
     peer.AddRelation(_network.FindAgent(action.Model));
 }
Example #2
0
 private Relation ProduceRelation(IPeer source, AgentId targetId)
 => source.GetRelation(targetId)
 ?? source.AddRelation(_network.FindAgent(targetId));