I have a project in a ASP.NET solution that is referenced by several other projects. However, I need to do different logic based on what project is referencing the dependent project.
For example, I have project A, which is referenced by project X, Y, and Z. Project A has a method GetName()
, which needs to do different things if project X is executing the method, as opposed to Project Y and Z.
What is a good way to implement this logic handling based on the project using the dependency?
question from:
https://stackoverflow.com/questions/65946678/what-is-the-best-way-to-handle-different-logic-depending-on-the-project-that-is 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…