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