1

Closed

[Web API] Make IHttpVirtualPathData.VirtualPath setter public

description

I'm almost done adding compatibility to WebAPI for AttributeRouting. I ran into a snag last night and was hoping it'd be an easy fix:

https://github.com/kamranayub/AttributeRouting/blob/web-api/src/AttributeRouting.WebApi/Framework/AttributeRoute.cs#L122

Attribute Routing overrides GetVirtualPath and in the MVC project, sets the VirtualPath. That line was failing in WebApi because its setter isn't public. I think I might be able to simply new up a concrete HttpVirtualPathData but I haven't tried.

If I can't work around it, I will submit a pull request (after testing it).
Closed Jul 19, 2012 at 12:10 AM by DRavva
Yes, it is public now.

comments

kayub wrote Apr 5, 2012 at 2:22 PM

I was able to workaround it by newing up a new concrete class and passing in the existing IHttpRoute I had. Hopefully this works fine.

BradWilson wrote Apr 30, 2012 at 6:10 PM

Fixed in snapshot b86bf576fcf1f84dc437a3c080eff070ea045e29.