예제 #1
0
        static void Main(string[] args)
        {
            var parent = new Person {
                Name = "Dick"
            };
            var child = new Person {
                Name = "Tom"
            };
            var sibling1 = new Person {
                Name = "Harry"
            };
            var sibling2 = new Person {
                Name = "Sally"
            };

            var persons = new List <Person>();

            persons.Add(parent);
            persons.Add(child);
            persons.Add(sibling1);
            persons.Add(sibling2);

            var relationships = new Relationships();

            relationships.AddParentChild(parent, child);
            relationships.AddSiblings(parent, sibling1);
            relationships.AddSiblings(parent, sibling2);
            relationships.AddSiblings(sibling1, sibling2);


            new Program(relationships, persons);  //horrible :D

            Console.ReadLine();
        }