You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We like to minimize the API and improve confusing parts. The Container.RegisterSingle methods are confusing, because developers sometimes think those methods are the oposite of RegisterMany, while their behavior is completely unrelated.
We would have liked removing those methods altogether in favor of simply using Register overloads that take in a Lifestyle.Singleton, as in Register<HomeController>(Lifestyle.Singleton). We tried this model in the v3 alpha1 release, but this proved to be problematic for users, because it made moving from v2 to v3 extremely hard.
So instead, we rename the RegisterSingle methods to RegisterSingleton. This makes migrating much easier and at the same time makes the API much clearer, because RegisterSingle is still confusing while having RegisterCollection methods at the same time.
The text was updated successfully, but these errors were encountered:
We like to minimize the API and improve confusing parts. The Container.RegisterSingle methods are confusing, because developers sometimes think those methods are the oposite of RegisterMany, while their behavior is completely unrelated.
We would have liked removing those methods altogether in favor of simply using
Register
overloads that take in aLifestyle.Singleton
, as inRegister<HomeController>(Lifestyle.Singleton)
. We tried this model in the v3 alpha1 release, but this proved to be problematic for users, because it made moving from v2 to v3 extremely hard.So instead, we rename the
RegisterSingle
methods toRegisterSingleton
. This makes migrating much easier and at the same time makes the API much clearer, becauseRegisterSingle
is still confusing while havingRegisterCollection
methods at the same time.The text was updated successfully, but these errors were encountered: