GithubHelp home page GithubHelp logo

Comments (8)

CZEMacLeod avatar CZEMacLeod commented on August 11, 2024 1

@adityamandaleeka Excellent.
Well there is an initial implementation of VirtualPathUtility for AspNet Core in the repo I mentioned previously. I started putting together some test cases, but haven't had time to go through all permutations or functions. There is a test library (netstandard2.0) with some test calls of ToAbsolute, and it is consumed by an AspNet Core net6.0 project and an AspNet/System.Web net48 project. *Same output on both.
I'm not quite sure what to do about a test plan, but I could probably create a PR with the code from the VirtualPathUtility.Library project as is?
Let me know how you want to proceed.

*It should be noted that the net48 implementation doesn't actually throw the error listed in the docs. The framework throws an ArgumentException with a custom message, not an ArgumentOutOfRangeException for ToAbsolute with an invalid relative path. I'm not sure which is actually better, but it is a mismatch. I can probably change it to more closely match the net framework implementation if need be.

from systemweb-adapters.

CZEMacLeod avatar CZEMacLeod commented on August 11, 2024

I think a lot of the implementation for this is already in System.Web.Util.UrlPath. It is just that that is a) not public and b) not in AspNet Core.

from systemweb-adapters.

adityamandaleeka avatar adityamandaleeka commented on August 11, 2024

Triage: This sounds reasonable. @CZEMacLeod would you be interested in contributing some/all of the implementation for this?

from systemweb-adapters.

CZEMacLeod avatar CZEMacLeod commented on August 11, 2024

@adityamandaleeka I've had a look at this and I could certainly put together something if it was based on the code / logic in the net48 System.Web.Util.UrlPath - but I don't believe that is under any form of open-source agreement. I guess the mono project would have a version, but again I'm not sure about the copyright for that.
I could certainly look at (re)implementing this from scratch, based solely on the published docs, although I think it might easily miss some edge cases covered in other implementations, especially as I am not aware of any sort of test suite/data to check the implementation against.

from systemweb-adapters.

CZEMacLeod avatar CZEMacLeod commented on August 11, 2024

@adityamandaleeka Some code here https://github.com/CZEMacLeod/System.Web.VirtualPathUtility - note that this is based partially on the net48 framework System.Web.Util.UrlPath implementation and I'm not entirely sure what the legalities are around that code.

from systemweb-adapters.

adityamandaleeka avatar adityamandaleeka commented on August 11, 2024

@CZEMacLeod, thanks for being cautious with licensing. The good news is that there's no issue from the licensing perspective to use code from the .NET Framework sources since they're under an acceptable license (MIT).

We might have to add a third-party notice entry in this repo. I'll follow up internally to take care of that.

from systemweb-adapters.

adityamandaleeka avatar adityamandaleeka commented on August 11, 2024

@CZEMacLeod Feel free to open a PR for this and we'll review the approach. It may take a bit longer than usual now since the team is fairly occupied at the moment, but we'll get to it as soon as we can.

from systemweb-adapters.

twsouthwick avatar twsouthwick commented on August 11, 2024

Closed via #179

from systemweb-adapters.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.