This changes TemplateMatcher to mutate RouteData.Values directly instead of creating a new dictionary and then merging in values. This is one the biggest single costs in routing in terms of both allocations and execution time. So Match now becomes TryMatch. This will dirty the state of the RVD, so the caller needs to snapshot it before calling into it (handled inside the TreeRouter or RouteCollection). Some subtle changes were needed to how/when values are added to be compatible with the existing tests. The general idea is that we add null values for non-parameter defaults or catchalls, but only if they don't trounce an existing value. This logic used to live in MergeValues but now it's in TryMatch since TryMatch might be working from existing data. Also fixed the .sln to avoid building a package that we use as shared source. |
||
|---|---|---|
| samples/RoutingSample.Web | ||
| src | ||
| test | ||
| tools | ||
| .gitattributes | ||
| .gitignore | ||
| .travis.yml | ||
| CONTRIBUTING.md | ||
| LICENSE.txt | ||
| NuGet.config | ||
| NuGetPackageVerifier.json | ||
| README.md | ||
| Routing.sln | ||
| Settings.StyleCop | ||
| appveyor.yml | ||
| build.cmd | ||
| build.ps1 | ||
| build.sh | ||
| global.json | ||
README.md
ASP.NET Routing
Contains routing middleware for routing requests to application logic.
This project is part of ASP.NET Core. You can find samples, documentation and getting started instructions for ASP.NET Core at the Home repo.