Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
106 views
in Technique[技术] by (71.8m points)

c# - What is the best way to handle different logic depending on the project that is using a dependency?

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...