Beispiel #1
0
        private static void DependencyInversionPrinciple()
        {
            Console.WriteLine("Dependency Inversion Principle");
            // Dependency Inversion Principle
            // States that high level parts of a system should not depend on low level parts of the system directly.
            // Both should depend on some kind of abstraction

            Person p = new Person("Gela");

            Person c1 = new Person("Gelas shvili pirveli");
            Person c2 = new Person("Gelas shvili meore");

            Relationships rels = new Relationships();

            rels.AddRelation(p, c1);
            rels.AddRelation(p, c2);

            var research = new Research(rels);
        }