Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename RegisterSingle methods to RegisterSingleton. #44

Closed
dotnetjunkie opened this issue May 12, 2015 · 0 comments
Closed

Rename RegisterSingle methods to RegisterSingleton. #44

dotnetjunkie opened this issue May 12, 2015 · 0 comments

Comments

@dotnetjunkie
Copy link
Collaborator

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.

@dotnetjunkie dotnetjunkie self-assigned this May 12, 2015
@dotnetjunkie dotnetjunkie added this to the Simple Injector v3.0 milestone May 12, 2015
dotnetjunkie pushed a commit that referenced this issue May 12, 2015
Moved obsolete methods to Container.Obsolete.cs (related to #44)
dotnetjunkie pushed a commit that referenced this issue May 21, 2015
Replaced the RegisterSingle methods that take in an instance with
RegisterInstance methods (related to #44)
@dotnetjunkie dotnetjunkie changed the title Remove Container.RegisterSingle methods. Rename RegisterSingle methods to RegisterSingleton. Jun 21, 2015
dotnetjunkie pushed a commit that referenced this issue Jun 21, 2015
Added RegisterSingleton methods and renamed the two RegisterInstance
methods to RegisterSingleton  (related to #44).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant