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

Make UrlHelper methods virtual #750

Closed
rynowak opened this issue Jul 4, 2014 · 2 comments
Closed

Make UrlHelper methods virtual #750

rynowak opened this issue Jul 4, 2014 · 2 comments

Comments

@rynowak
Copy link
Member

rynowak commented Jul 4, 2014

@kulmugdha moved from aspnet/Routing#80

On the routing blog http://blogs.msdn.com/b/webdev/archive/2014/06/20/asp-net-vnext-routing-overview.aspx, a user expressed that he wants to slightly modify the generated URL on its way out. If we don't make the methods virtual, he has to do either of following.

  1. implement IUrlHelper from scratch
  2. Implement IUrlHelper and wrap an instance of UrlHelper in the implementation.
  3. Extend UrlHelper and use Explicit Interface Implementation

None of these is very optimal.

@kichalla
Copy link
Member

Just FYI...one more scenario that I have come across: Generate a link to a local or cdn server url. In this case the user is currently having an extension on UrlHelper...making the Content method virtual would help in this case...

@kichalla
Copy link
Member

Resolved as part of commit: 43c7ddb

@kichalla kichalla added this to the 6.0.0-alpha4 milestone Sep 24, 2014
@rynowak rynowak modified the milestones: 6.0.0-beta1, 6.0.0-alpha4 Sep 25, 2014
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

4 participants