This repository has been archived by the owner on Nov 2, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 318
Rename AddInstance to AddSingleton #319
Comments
@lodejard @davidfowl @halter73 thoughts on the name? |
Is there an overload where the only difference would be between Type and Object? If that's okay any naming works for me |
Makes the 3 scenarios line up: AddSingleton<IService, MyService>();
AddSingleton<IService>(serviceProvider => new MyService(serviceProvider));
AddSingleton<IService>(new MyService()); |
I'm sold. |
pranavkm
added a commit
that referenced
this issue
Nov 12, 2015
pranavkm
added a commit
that referenced
this issue
Nov 12, 2015
This was referenced Nov 26, 2015
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The name
AddInstance
doesn't make it super clear what the lifetime is of the object. (If you stop and think about it, it can only be Singleton, but every time I call that method I have to stop and think about it.)So, we should rename
AddInstance
toAddSingleton
, or perhapsAddSingletonInstance
.The text was updated successfully, but these errors were encountered: