Refactoring Singleton Overuse

后端 未结 7 1957
一个人的身影
一个人的身影 2020-12-14 00:06

Today I had an epiphany, and it was that I was doing everything wrong. Some history: I inherited a C# application, which was really just a collection of static methods, a co

7条回答
  •  囚心锁ツ
    2020-12-14 00:41

    Since you know about Dependency Injection, have you considered using an IoC container to manage lifetimes? See my answer to a question on static classes.

提交回复
热议问题