15 writes to _string
System.Private.Uri (15)
System\Uri.cs (9)
2122_string = _string.Substring(0, idx);
2140_string = _string.Substring(0, idx);
2190_string = newHost;
3294_string = string.Empty;
3298_string = _syntax.SchemeName + SchemeDelimiter;
3312_string = string.Concat(_string, _originalUnicodeString.AsSpan(origIdx));
3372_string += EscapeUnescapeIri(_originalUnicodeString, offset, origIdx, UriComponents.Path);
3508_string += EscapeUnescapeIri(_originalUnicodeString, offset, origIdx, UriComponents.Query);
3565_string += EscapeUnescapeIri(_originalUnicodeString, offset, origIdx, UriComponents.Fragment);
126 references to _string
System.Private.Uri (126)
System\Uri.cs (100)
292char ch = _string[_info.Offset.Path];
499[MemberNotNull(nameof(_string))]
976? _string
977: (IsDosPath && (_string[start] == '/' || _string[start] == '\\'))
978? _string.Substring(start + 1, _info.Offset.Query - start - 1)
979: _string.Substring(start, _info.Offset.Query - start);
1014if (_string[start] == '/' || _string[start] == '\\')
1026UriHelper.UnescapeString(_string, start, _info.Offset.Query, result, ref count, c_DummyChar,
1134public string OriginalString => _originalUnicodeString ?? _string;
1557return _string;
1579result = _string;
1616(IsDosPath && _string[_info.Offset.Path + SecuredPathIndex - 1] == '|')) // A rare case of c|\
1626result = _string.AsSpan(_info.Offset.Scheme, _info.Offset.End - _info.Offset.Scheme);
1747if (string.Equals(_string, other._string, IsUncOrDosPath ? StringComparison.OrdinalIgnoreCase : StringComparison.Ordinal))
1769string str = other._string;
1778if (_string[i1] != str[i2])
1791if (i1 < _info.Offset.Path && _string[i1] != ':')
1982int length = _string.Length;
1989Debug.Assert(ReferenceEquals(_string, OriginalString));
1991fixed (char* pUriString = _string)
2122_string = _string.Substring(0, idx);
2140_string = _string.Substring(0, idx);
2216info.Offset.End = (ushort)_string.Length;
2229while (UriHelper.IsLWS(_string[idx]))
2241while (idx < end && (_string[idx] == '/' || _string[idx] == '\\'))
2252while (_string[idx++] != ':')
2259if (_string[idx] == '\\' || _string[idx + 1] == '\\')
2268while (idx < end && (_string[idx] == '/' || _string[idx] == '\\'))
2312while (_string[idx] != '@')
2437string host = CreateHostStringHelper(_string, _info.Offset.Host, _info.Offset.Path, ref flags, ref _info.ScopeId);
2495host[i] != _string[_info.Offset.Host + i])
2609if ((_info.Offset.Host + i) >= _info.Offset.End || host[i] != _string[_info.Offset.Host + i])
2681else if (IsDosPath && _string[_info.Offset.Path + SecuredPathIndex - 1] == '|')
2716else if (IsDosPath && _string[_info.Offset.Path + SecuredPathIndex - 1] == '|')
2739string str = _string;
2756string str = _string;
3020return _string.Substring(_info.Offset.Scheme, _info.Offset.Path - _info.Offset.Scheme);
3023_string.AsSpan(_info.Offset.Scheme, _info.Offset.User - _info.Offset.Scheme),
3024_string.AsSpan(_info.Offset.Host, _info.Offset.Path - _info.Offset.Host));
3033return _string.Substring(_info.Offset.Host, _info.Offset.Path - _info.Offset.Host);
3035return string.Concat(_string.AsSpan(_info.Offset.Host, _info.Offset.Path - _info.Offset.Host),
3040if (_info.Offset.Scheme == 0 && _info.Offset.End == _string.Length)
3041return _string;
3043return _string.Substring(_info.Offset.Scheme, _info.Offset.End - _info.Offset.Scheme);
3050_string.AsSpan(_info.Offset.Scheme, _info.Offset.User - _info.Offset.Scheme),
3051_string.AsSpan(_info.Offset.Host, _info.Offset.Fragment - _info.Offset.Host));
3053if (_info.Offset.Scheme == 0 && _info.Offset.Fragment == _string.Length)
3054return _string;
3056return _string.Substring(_info.Offset.Scheme, _info.Offset.Fragment - _info.Offset.Scheme);
3060return _string.Substring(_info.Offset.Scheme, _info.Offset.Path - _info.Offset.Scheme);
3064if (_info.Offset.Scheme == 0 && _info.Offset.Fragment == _string.Length)
3065return _string;
3067return _string.Substring(_info.Offset.Scheme, _info.Offset.Fragment - _info.Offset.Scheme);
3073return _string.Substring(_info.Offset.Scheme, _info.Offset.User - _info.Offset.Scheme);
3083while (_string[--idx] != ':')
3086return (idx - _info.Offset.Host == 0) ? string.Empty : _string.Substring(_info.Offset.Host,
3093_info.Offset.End > _info.Offset.Path && _string[_info.Offset.Path] == '/')
3102return _string.Substring(delimiterAwareIdx, _info.Offset.Query - delimiterAwareIdx);
3114return _string.Substring(delimiterAwareIdx, _info.Offset.Fragment - delimiterAwareIdx);
3126return _string.Substring(delimiterAwareIdx, _info.Offset.End - delimiterAwareIdx);
3130_string.Substring(_info.Offset.User, _info.Offset.Path - _info.Offset.User);
3136return string.Concat(_string.AsSpan(_info.Offset.User, _info.Offset.Path - _info.Offset.User),
3140return _string.Substring(_info.Offset.Path, _info.Offset.Fragment - _info.Offset.Path);
3146_string.AsSpan(_info.Offset.Scheme, _info.Offset.User - _info.Offset.Scheme),
3147_string.AsSpan(_info.Offset.Host, _info.Offset.End - _info.Offset.Host));
3149if (_info.Offset.Scheme == 0 && _info.Offset.End == _string.Length)
3150return _string;
3152return _string.Substring(_info.Offset.Scheme, _info.Offset.End - _info.Offset.Scheme);
3155return _string.Substring(_info.Offset.Path, _info.Offset.End - _info.Offset.Path);
3171return _string.Substring(_info.Offset.User, delimiterAwareIdx - _info.Offset.User);
3211int length = _string.Length;
3217fixed (char* str = _string)
3219GetLengthWithoutTrailingSpaces(_string, ref length, idx);
3302_info.Offset.Path = (ushort)_string.Length;
3312_string = string.Concat(_string, _originalUnicodeString.AsSpan(origIdx));
3315string str = _string;
3374if (_string.Length > ushort.MaxValue)
3380length = _string.Length;
3382if (_string == _originalUnicodeString)
3384GetLengthWithoutTrailingSpaces(_string, ref length, idx);
3388fixed (char* str = _string)
3510if (_string.Length > ushort.MaxValue)
3516length = _string.Length;
3518if (_string == _originalUnicodeString)
3520GetLengthWithoutTrailingSpaces(_string, ref length, idx);
3527fixed (char* str = _string)
3567if (_string.Length > ushort.MaxValue)
3573length = _string.Length;
3575GetLengthWithoutTrailingSpaces(_string, ref length, idx);
3581fixed (char* str = _string)
4313dest.Append(_string.AsSpan(_info.Offset.Path, _info.Offset.Query - _info.Offset.Path));
4335ReadOnlySpan<char> str = _string;
4351dest.Append(_string.AsSpan(_info.Offset.Path, _info.Offset.Query - _info.Offset.Path));
4372dest.Append(_string.AsSpan(_info.Offset.Path, _info.Offset.Query - _info.Offset.Path));
System\UriExt.cs (26)
19[MemberNotNull(nameof(_string))]
39ParsingError err = ParseScheme(_string, ref _flags, ref _syntax!);
60((uriKind == UriKind.Relative || (_string.Length >= 2 && (_string[0] != '\\' || _string[1] != '\\')))
93if (IriParsing && CheckForUnicodeOrEscapedUnreserved(_string))
98_originalUnicodeString = _string; // original string location changed
207if (_string.Length > ushort.MaxValue)
447fixed (char* str = _string)
456if (CheckForColonInFirstPathSegment(_string))
460return (CheckCanonical(str, ref idx, _string.Length, c_EOL)
510if (idx >= _info.Offset.User || _string[idx - 1] == '\\' || _string[idx] == '\\')
515while (++idx < _info.Offset.User && (_string[idx] == '/' || _string[idx] == '\\'))
535if (IsDosPath && _string[_info.Offset.Path + SecuredPathIndex - 1] == '|')
564if (idx + 1 >= _string.Length || str[idx] != '/' || str[idx + 1] != '/')
888if (ReferenceEquals(newUriString, baseUri._string))
898return UriHelper.EscapeString(_string, checkExistingEscaped: true, UriHelper.UnreservedReserved);
902return UnescapeDataString(_string);
906if (_string.Length == 0)
910UriHelper.UnescapeString(_string, ref vsb, c_DummyChar, c_DummyChar, c_DummyChar, UnescapeMode.EscapeUnescape, null, false);
1051[MemberNotNull(nameof(_string))]
1068while (otherUri._string[portIndex] != ':' && portIndex > otherUri._info.Offset.Host)
1072if (otherUri._string[portIndex] != ':')
1083_string = otherUri._string;