-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Add Path.GetRelativePath #11689
Add Path.GetRelativePath #11689
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" /> | ||
| <ItemGroup> | ||
| <Project Include="System.Runtime.Extensions.csproj" /> | ||
| <Project Include="System.Runtime.Extensions.csproj"> | ||
| <TargetGroup>netcoreapp1.1</TargetGroup> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ericstj should we have a different AssemblyVersion for the netcoreapp1.1 contract?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No: we have similar precedent on desktop where more surface area is visible via facades. |
||
| </Project> | ||
| </ItemGroup> | ||
| <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.traversal.targets))\dir.traversal.targets" /> | ||
| </Project> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -799,6 +799,9 @@ public static partial class Path | |
| public static string GetTempPath() { return default(string); } | ||
| public static bool HasExtension(string path) { return default(bool); } | ||
| public static bool IsPathRooted(string path) { return default(bool); } | ||
| #if netcoreapp11 | ||
| public static string GetRelativePath(string relativeTo, string path) { return default(string); } | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. New APIs should only be exposed in netcoreapp and not netstandard.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How will this work? Do we need to have two "prerelease" contract versions, one for the next version of netstandard, and one for the next version of necoreapp?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ericstj has a PR out #11272 which shows how to add these specifically for .NET Core. We will be handling things that are part of netstandard differently moving forward and the APIs will be added in a different place from where we actually build .NET Core so these projects will essentially be converted to .NET Core refs only.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So I can just make the same changes then?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Presumably yes but I'm not sure if all the kinks have been worked out yet. |
||
| #endif | ||
| } | ||
| } | ||
| namespace System.Net | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,9 @@ | ||
| { | ||
| "dependencies": { | ||
| "System.Runtime": "4.0.20" | ||
| "System.Runtime": "4.3.0-beta-24516-03" | ||
| }, | ||
| "frameworks": { | ||
| "netstandard1.7": { | ||
| "imports": [ | ||
| "dotnet5.8" | ||
| ] | ||
| } | ||
| "netstandard1.7": { }, | ||
| "netcoreapp1.1": { } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -186,7 +186,8 @@ | |
| <Link>Common\Interop\Windows\mincore\Interop.LookupAccountNameW.cs</Link> | ||
| </Compile> | ||
| </ItemGroup> | ||
| <ItemGroup Condition=" '$(TargetsWindows)' == 'true' And '$(CoreClrOrCorRt)' == 'true'"> <!-- Microsoft.Win32.Registry, needed for some Environment env var support --> | ||
| <ItemGroup Condition=" '$(TargetsWindows)' == 'true' And '$(CoreClrOrCorRt)' == 'true'"> | ||
| <!-- Microsoft.Win32.Registry, needed for some Environment env var support --> | ||
| <Compile Include="..\..\Microsoft.Win32.Registry\src\Microsoft\Win32\Registry.cs"> | ||
| <Link>Microsoft.Win32.Registry\src\Microsoft\Win32\Registry.cs</Link> | ||
| </Compile> | ||
|
|
@@ -371,7 +372,8 @@ | |
| <TargetingPackReference Include="System.Private.CoreLib" /> | ||
| <TargetingPackReference Include="System.Private.CoreLib.InteropServices" /> | ||
| <TargetingPackReference Include="System.Private.Interop" /> | ||
| <TargetingPackReference Include="System.Private.Reflection" /> <!-- can remove once we remove the Environment reflection workaround --> | ||
| <!-- can remove once we remove the Environment reflection workaround --> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: reformatting here may have changed meaning of the comment.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Moved this above, thanks |
||
| <TargetingPackReference Include="System.Private.Reflection" /> | ||
| <TargetingPackReference Include="System.Private.Threading" /> | ||
| <ProjectReference Include="$(SourceDir)/mscorlib.WinRT-Facade/mscorlib.WinRT-Facade.csproj" Condition="'$(TargetGroup)' == 'netcore50aot'" /> | ||
| <ProjectReference Include="..\..\System.Runtime\src\redist\System.Runtime.depproj"> | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to substitute this function with
string.Compareorstring.CompareOrdinalinstead? The builtin string functions will typically be faster than hand-rolled pointer arithmetic. For example,CompareOrdinalcompares 4 chars at a time and uses loop unrolling.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we had the same concept exposed, sure. I can't do it with string without calling compare repeatedly.