Пример #1
0
        internal static PersonRelationship CreatePair(List<Person> people, int j, int i)
        {
            var personPair = new PersonRelationship();
            setPerson1(personPair, people[i], people[j]);
            setPerson2(personPair, people[j], people[i]);

            return personPair;
        }
Пример #2
0
 private static void setPerson2(PersonRelationship personPair, Person firstPerson, Person otherPerson)
 {
     if (firstPerson.IsYoungerThan(otherPerson))
     {
         personPair.Person2 = otherPerson;
     }
     else
     {
         personPair.Person2 = firstPerson;
     }
 }