public class BigPerformance
{
public decimal Value { get; set; }
}
public class Performance
{
public BigPerformance BigPerf { get; set; }
}
public class Category
{
public Performance Perf { get; set; }
}
私が電話した場合:
Category cat = new Category();
cat.Perf.BigPerf.Value = 1.0;
これはデメテルの法則/最小知識の原則に違反していると思いますか?
もしそうなら、内部クラスのプロパティが多数ある場合、どうすればこれを修正できますか?