且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

C#访问从"类;父项目"在"子项目"?

更新时间:2022-04-16 08:51:08

如果您是项目之间共享逻辑,你需要隔离的依赖,并将其移动到共享位置(例如新项目),调整你的依赖,使您的核心逻辑住在一个核心结构域样的项目或捣烂您的项目组合在一起。

If you're sharing logic between projects, you need to isolate that dependency and move it to a shared location (new project for example), restructure your dependencies so that your core logic lives in a core domain-like project or mash your projects together.

后者是不是真的干净的解决方案。我建议考虑你自己的问题,真正试图回答为什么我需要一个循环引用?我如何重组,使我的依赖关系是否有意义?

The latter is not really the cleanest of solutions. I would recommend thinking about your own question and really try to answer "Why do I NEED a circular reference? How can I restructure so that my dependencies make sense?".