Skip to content
This repository has been archived by the owner on Nov 2, 2018. It is now read-only.

For all the ServiceDescriber and ServiceCollection methods that use generic constrainsts we should add type constraints #135

Closed
pranavkm opened this issue Nov 7, 2014 · 0 comments

Comments

@pranavkm
Copy link
Contributor

pranavkm commented Nov 7, 2014

For e.g.
public ServiceDescriptor Transient<TService, TImplementation>()

should be

public ServiceDescriptor Transient<TService, TImplementation>() where TImplementation : TService

This would give us compile time failures rather than runtime failures when we do something silly like:

describer.Transient<IFoo, int>();

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants