How to solve the violations of the Law of Demeter?

后端 未结 10 1334
一个人的身影
一个人的身影 2021-01-29 22:23

A colleague and I designed a system for our customer, and in our opinion we created a nice clean design. But I\'m having problems with some coupling we\'ve introduced. I could t

10条回答
  •  青春惊慌失措
    2021-01-29 23:05

    The third problem is very simple: Discipline.ToString() should evaluate the Name property That way you only call Kind.Discipline

提交回复
热议问题