@@ -1900,7 +1900,7 @@ private unsafe ParsingError PrivateParseMinimal()
1900
1900
}
1901
1901
1902
1902
// Unix Path
1903
- if ( ! IsWindowsSystem && InFact ( Flags . UnixPath ) )
1903
+ if ( ! OperatingSystem . IsWindows ( ) && InFact ( Flags . UnixPath ) )
1904
1904
{
1905
1905
_flags |= Flags . BasicHostType ;
1906
1906
_flags |= ( Flags ) idx ;
@@ -1974,7 +1974,7 @@ private unsafe ParsingError PrivateParseMinimal()
1974
1974
_flags |= Flags . UncPath ;
1975
1975
idx = i ;
1976
1976
}
1977
- else if ( ! IsWindowsSystem && _syntax . InFact ( UriSyntaxFlags . FileLikeUri ) && pUriString [ i - 1 ] == '/' && i - idx == 3 )
1977
+ else if ( ! OperatingSystem . IsWindows ( ) && _syntax . InFact ( UriSyntaxFlags . FileLikeUri ) && pUriString [ i - 1 ] == '/' && i - idx == 3 )
1978
1978
{
1979
1979
_syntax = UriParser . UnixFileUri ;
1980
1980
_flags |= Flags . UnixPath | Flags . AuthorityFound ;
@@ -2077,7 +2077,7 @@ private unsafe ParsingError PrivateParseMinimal()
2077
2077
return ParsingError . BadAuthorityTerminator ;
2078
2078
}
2079
2079
// When the hostTerminator is '/' on Unix, use the UnixFile syntax (preserve backslashes)
2080
- else if ( ! IsWindowsSystem && hostTerminator == '/' && NotAny ( Flags . ImplicitFile ) && InFact ( Flags . UncPath ) && _syntax == UriParser . FileUri )
2080
+ else if ( ! OperatingSystem . IsWindows ( ) && hostTerminator == '/' && NotAny ( Flags . ImplicitFile ) && InFact ( Flags . UncPath ) && _syntax == UriParser . FileUri )
2081
2081
{
2082
2082
_syntax = UriParser . UnixFileUri ;
2083
2083
}
@@ -3510,7 +3510,7 @@ private static unsafe int ParseSchemeCheckImplicitFile(char* uriString, int leng
3510
3510
3511
3511
// Unix: Unix path?
3512
3512
// A path starting with 2 / or \ (including mixed) is treated as UNC and will be matched below
3513
- if ( ! IsWindowsSystem && idx < length && uriString [ idx ] == '/' &&
3513
+ if ( ! OperatingSystem . IsWindows ( ) && idx < length && uriString [ idx ] == '/' &&
3514
3514
( idx + 1 == length || ( uriString [ idx + 1 ] != '/' && uriString [ idx + 1 ] != '\\ ' ) ) )
3515
3515
{
3516
3516
flags |= ( Flags . UnixPath | Flags . ImplicitFile | Flags . AuthorityFound ) ;
@@ -4481,7 +4481,7 @@ private unsafe void GetCanonicalPath(ref ValueStringBuilder dest, UriFormat form
4481
4481
}
4482
4482
4483
4483
// On Unix, escape '\\' in path of file uris to '%5C' canonical form.
4484
- if ( ! IsWindowsSystem && InFact ( Flags . BackslashInPath ) && _syntax. NotAny( UriSyntaxFlags . ConvertPathSlashes ) && _syntax. InFact( UriSyntaxFlags . FileLikeUri ) && ! IsImplicitFile)
4484
+ if ( ! OperatingSystem . IsWindows ( ) && InFact ( Flags . BackslashInPath ) && _syntax. NotAny( UriSyntaxFlags . ConvertPathSlashes ) && _syntax. InFact( UriSyntaxFlags . FileLikeUri ) && ! IsImplicitFile)
4485
4485
{
4486
4486
// We can't do an in-place escape, create a copy
4487
4487
var copy = new ValueStringBuilder( stackalloc char [ StackallocThreshold] ) ;
@@ -5001,7 +5001,7 @@ private static string CombineUri(Uri basePart, string relativePart, UriFormat ur
5001
5001
Compress( path, 3 , ref length, basePart. Syntax) ;
5002
5002
return string . Concat( path. AsSpan( 1 , length - 1 ) , extra) ;
5003
5003
}
5004
- else if ( ! IsWindowsSystem && basePart. IsUnixPath)
5004
+ else if ( ! OperatingSystem . IsWindows ( ) && basePart. IsUnixPath)
5005
5005
{
5006
5006
left = basePart. GetParts( UriComponents. Host, UriFormat. Unescaped) ;
5007
5007
}
0 commit comments