Skip to content
This repository has been archived by the owner on Jan 24, 2021. It is now read-only.

Tweaked overloads of Dependency and Dependencies #1910

Merged
merged 2 commits into from
Aug 19, 2015

Conversation

khellang
Copy link
Member

Fixes #1909

The old Dependencies method took a params object[] dependencies argument, looped through them and called this.Dependency<T>(dependency) where T was inferred to object 😕 I can't see how this has ever worked.

This PR removes the overloads accepting object and object[] and force you to use an overload with an explicit (or inferred) generic type parameter.

@khellang
Copy link
Member Author

This could actually be a minor breaking change, since people could've used the old method to register all kinds of different types, and the compiler won't be able to infer the type anymore. The fix is as simple as helping the compiler out by specifying an explicit type, like I had to do here.

@khellang
Copy link
Member Author

Rebased 😉

@thecodejunkie thecodejunkie added this to the 1.3 milestone Aug 18, 2015
@thecodejunkie thecodejunkie self-assigned this Aug 18, 2015
thecodejunkie added a commit that referenced this pull request Aug 19, 2015
Tweaked overloads of Dependency and Dependencies
@thecodejunkie thecodejunkie merged commit eca21b4 into NancyFx:master Aug 19, 2015
@khellang khellang deleted the issue-1909 branch August 19, 2015 13:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Browser with.Dependencies(..) broken?
2 participants