-
Notifications
You must be signed in to change notification settings - Fork 68
Add System.Web.VirtualPathUtility #179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
twsouthwick
merged 18 commits into
dotnet:main
from
CZEMacLeod:czemacleod/virtualpathutility
Sep 7, 2022
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
6d524b3
Add System.Web.VirtualPathUtility
CZEMacLeod 5eaa215
Add tests and correct a few edge cases in VirtualPathUtility
CZEMacLeod 22d52e1
Fix null reference issues in tests
CZEMacLeod c259ae3
Align exceptions with framework and remove resource file
CZEMacLeod cbd601f
Add comment detailing reason why some data for tests is conditional o…
CZEMacLeod c27720e
Regenerate Ref.Standard.cs and TypeForwards.Framework.cs after mergin…
CZEMacLeod bc4a3fd
Clean up tabs/spaces in tests and remove some blank lines
CZEMacLeod 0cb34b1
Work around issue with netstandard and nullability
CZEMacLeod 71b9b91
Update src/Microsoft.AspNetCore.SystemWebAdapters/Microsoft.AspNetCor…
CZEMacLeod c3b6975
add excluded attributes
twsouthwick 77cd972
Revert "Work around issue with netstandard and nullability"
CZEMacLeod 2df2800
Add THIRD-PARTY-NOTICES.tx
twsouthwick cca5264
Update VPP Tests to support (I)HttpRuntime changes from #185
CZEMacLeod bd6cf61
Break methods back out into StringUtil and UrlPath
CZEMacLeod 650e446
Add summaries and attribution for StringUtil and UrlPath classes
CZEMacLeod 533e351
Add licence headers
CZEMacLeod f60a864
Update src/Microsoft.AspNetCore.SystemWebAdapters/Utilities/UrlPath.cs
CZEMacLeod 7d4b4b0
Removed legacy bug references from code
CZEMacLeod File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| .NET System Web Adapters uses third-party libraries or other resources that may be | ||
| distributed under licenses different than the .NET System Web Adapters software. | ||
|
|
||
| In the event that we accidentally failed to list a required notice, please | ||
| bring it to our attention. Post an issue or email us: | ||
|
|
||
| [email protected] | ||
|
|
||
| The attached notices are provided for information only. | ||
|
|
||
| License notice for .NET Framework | ||
| ------------------------------- | ||
|
|
||
| Copyright (c) Microsoft Corporation | ||
| Licenses under the MIT License | ||
|
|
||
| Available at | ||
| https://github.com/microsoft/referencesource/blob/master/LICENSE.txt |
1 change: 1 addition & 0 deletions
1
src/Microsoft.AspNetCore.SystemWebAdapters/Generated/ExcludedAttributes.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| T:System.Diagnostics.CodeAnalysis.NotNullIfNotNullAttribute |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/Microsoft.AspNetCore.SystemWebAdapters/Utilities/StringUtil.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
|
|
||
| namespace System.Web.Util; | ||
|
|
||
| /// <summary> | ||
| /// Provides utility methods for string operations. | ||
| /// </summary> | ||
| /// <remarks> | ||
| /// Portions of this code are based on code originally Copyright (c) 1999 Microsoft Corporation | ||
| /// System.Web.Util.StringUtil at https://github.com/microsoft/referencesource/blob/master/System.Web/Util/StringUtil.cs | ||
| /// These files are released under an MIT licence according to https://github.com/microsoft/referencesource#license | ||
| /// </remarks> | ||
| internal static class StringUtil | ||
| { | ||
| /* | ||
| * Determines if the first string starts with the second string, ignoring case. | ||
| * Fast, non-culture aware. | ||
| */ | ||
| internal static bool StringStartsWithIgnoreCase(string s1, string s2) | ||
| { | ||
| if (string.IsNullOrEmpty(s1) || string.IsNullOrEmpty(s2)) return false; | ||
| if (s2.Length > s1.Length) return false; | ||
| return s1.StartsWith(s2, StringComparison.OrdinalIgnoreCase); | ||
| } | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.