5 writes to _info
System.Private.Uri (5)
228 references to _info
System.Private.Uri (228)
System\Uri.cs (213)
149Debug.Assert(InFact(Flags.MinimalUriInfoSet) == (_info is not null));
151if (_info is UriInfo info)
261lock (_info)
339char ch = _string[_info.Offset.Path];
366[MemberNotNull(nameof(_info))]
375Debug.Assert(_info != null && (_flags & Flags.MinimalUriInfoSet) != 0);
376return _info;
388[MemberNotNull(nameof(_info))]
1015Debug.Assert(_info != null);
1016Debug.Assert(_info.Host != null);
1022start = IsUncPath ? _info.Offset.Host - 2 : _info.Offset.Path;
1024string str = (IsImplicitFile && _info.Offset.Host == (IsDosPath ? 0 : 2) &&
1025_info.Offset.Query == _info.Offset.End)
1028? _string.Substring(start + 1, _info.Offset.Query - start - 1)
1029: _string.Substring(start, _info.Offset.Query - start);
1047start = _info.Offset.Path;
1049string host = _info.Host;
1050result = new char[host.Length + 3 + _info.Offset.Fragment - _info.Offset.Path];
1076UriHelper.UnescapeString(_string, start, _info.Offset.Query, result, ref count, c_DummyChar,
1125return (int)_info.Offset.PortValue;
1209return _info.Host!;
1224if (_info?.IdnHost is null)
1228string host = _info.Host!;
1237host = _info._moreInfo?.ScopeId is string scopeId ?
1257_info.IdnHost = host;
1260return _info.IdnHost;
1611return _info.String ??=
1634if (_info.String is not null)
1636result = _info.String;
1666(IsDosPath && _string[_info.Offset.Path + SecuredPathIndex - 1] == '|')) // A rare case of c|\
1676result = _string.AsSpan(_info.Offset.Scheme, _info.Offset.End - _info.Offset.Scheme);
1814int i1 = _info.Offset.Host;
1815int end1 = _info.Offset.Path;
1817int i2 = other._info.Offset.Host;
1818int end2 = other._info.Offset.Path;
1841if (i1 < _info.Offset.Path && _string[i1] != ':')
1855if (!_info.Host!.Equals(other._info.Host))
1870MoreInfo selfInfo = _info.MoreInfo;
1871MoreInfo otherInfo = other._info.MoreInfo;
2468lock (_info)
2484string host = CreateHostStringHelper(_string, _info.Offset.Host, _info.Offset.Path, ref flags, _info);
2532if (_info._moreInfo?.ScopeId is not null)
2541if ((_info.Offset.Host + i) >= _info.Offset.End ||
2542host[i] != _string[_info.Offset.Host + i])
2552_info.Host = host;
2624if (_info.Host != null)
2630if (_info.Host is null)
2654host = CreateHostStringHelper(host, 0, host.Length, ref flags, _info);
2658if ((_info.Offset.Host + i) >= _info.Offset.End || host[i] != _string[_info.Offset.Host + i])
2677_info.Offset.PortValue = 0;
2687if (port != _info.Offset.PortValue)
2695_info.Offset.PortValue = (ushort)port;
2699_info.Host = host;
2712Debug.Assert(_info != null && (_flags & Flags.MinimalUriInfoSet) != 0);
2730else if (IsDosPath && _string[_info.Offset.Path + SecuredPathIndex - 1] == '|')
2751Debug.Assert(_info != null && (_flags & Flags.MinimalUriInfoSet) != 0);
2765else if (IsDosPath && _string[_info.Offset.Path + SecuredPathIndex - 1] == '|')
2841ReadOnlySpan<char> slice = str.AsSpan(_info.Offset.User, _info.Offset.Host - _info.Offset.User);
2894string host = _info.Host!;
2934if ((parts & UriComponents.SerializationInfoString) != 0 && HostType == Flags.IPv6HostType && _info._moreInfo?.ScopeId is string scopeId)
2950bool success = _info.Offset.PortValue.TryFormat(dest.AppendSpan(MaxUshortLength), out int charsWritten);
2978if ((parts & UriComponents.Query) != 0 && _info.Offset.Query < _info.Offset.Fragment)
2980int offset = (_info.Offset.Query + 1);
2993str.AsSpan(offset, _info.Offset.Fragment - offset),
3010UriHelper.UnescapeString(str, offset, _info.Offset.Fragment,
3017if ((parts & UriComponents.Fragment) != 0 && _info.Offset.Fragment < _info.Offset.End)
3019int offset = _info.Offset.Fragment + 1;
3032str.AsSpan(offset, _info.Offset.End - offset),
3049UriHelper.UnescapeString(str, offset, _info.Offset.End,
3071return _string.Substring(_info.Offset.Scheme, _info.Offset.Path - _info.Offset.Scheme);
3074_string.AsSpan(_info.Offset.Scheme, _info.Offset.User - _info.Offset.Scheme),
3075_string.AsSpan(_info.Offset.Host, _info.Offset.Path - _info.Offset.Host));
3084return _string.Substring(_info.Offset.Host, _info.Offset.Path - _info.Offset.Host);
3086return string.Concat(_string.AsSpan(_info.Offset.Host, _info.Offset.Path - _info.Offset.Host),
3087":", _info.Offset.PortValue.ToString(CultureInfo.InvariantCulture));
3091if (_info.Offset.Scheme == 0 && _info.Offset.End == _string.Length)
3094return _string.Substring(_info.Offset.Scheme, _info.Offset.End - _info.Offset.Scheme);
3101_string.AsSpan(_info.Offset.Scheme, _info.Offset.User - _info.Offset.Scheme),
3102_string.AsSpan(_info.Offset.Host, _info.Offset.Fragment - _info.Offset.Host));
3104if (_info.Offset.Scheme == 0 && _info.Offset.Fragment == _string.Length)
3107return _string.Substring(_info.Offset.Scheme, _info.Offset.Fragment - _info.Offset.Scheme);
3111return _string.Substring(_info.Offset.Scheme, _info.Offset.Path - _info.Offset.Scheme);
3115if (_info.Offset.Scheme == 0 && _info.Offset.Fragment == _string.Length)
3118return _string.Substring(_info.Offset.Scheme, _info.Offset.Fragment - _info.Offset.Scheme);
3124return _string.Substring(_info.Offset.Scheme, _info.Offset.User - _info.Offset.Scheme);
3130int idx = _info.Offset.Path;
3137return (idx - _info.Offset.Host == 0) ? string.Empty : _string.Substring(_info.Offset.Host,
3138idx - _info.Offset.Host);
3144_info.Offset.End > _info.Offset.Path && _string[_info.Offset.Path] == '/')
3145delimiterAwareIdx = _info.Offset.Path + 1;
3147delimiterAwareIdx = _info.Offset.Path;
3149if (delimiterAwareIdx >= _info.Offset.Query)
3153return _string.Substring(delimiterAwareIdx, _info.Offset.Query - delimiterAwareIdx);
3158delimiterAwareIdx = _info.Offset.Query + 1;
3160delimiterAwareIdx = _info.Offset.Query;
3162if (delimiterAwareIdx >= _info.Offset.Fragment)
3165return _string.Substring(delimiterAwareIdx, _info.Offset.Fragment - delimiterAwareIdx);
3170delimiterAwareIdx = _info.Offset.Fragment + 1;
3172delimiterAwareIdx = _info.Offset.Fragment;
3174if (delimiterAwareIdx >= _info.Offset.End)
3177return _string.Substring(delimiterAwareIdx, _info.Offset.End - delimiterAwareIdx);
3180return (_info.Offset.Path - _info.Offset.User == 0) ? string.Empty :
3181_string.Substring(_info.Offset.User, _info.Offset.Path - _info.Offset.User);
3187return string.Concat(_string.AsSpan(_info.Offset.User, _info.Offset.Path - _info.Offset.User),
3188":", _info.Offset.PortValue.ToString(CultureInfo.InvariantCulture));
3191return _string.Substring(_info.Offset.Path, _info.Offset.Fragment - _info.Offset.Path);
3197_string.AsSpan(_info.Offset.Scheme, _info.Offset.User - _info.Offset.Scheme),
3198_string.AsSpan(_info.Offset.Host, _info.Offset.End - _info.Offset.Host));
3200if (_info.Offset.Scheme == 0 && _info.Offset.End == _string.Length)
3203return _string.Substring(_info.Offset.Scheme, _info.Offset.End - _info.Offset.Scheme);
3206return _string.Substring(_info.Offset.Path, _info.Offset.End - _info.Offset.Path);
3215delimiterAwareIdx = _info.Offset.Host - 1;
3217delimiterAwareIdx = _info.Offset.Host;
3219if (_info.Offset.User >= delimiterAwareIdx)
3222return _string.Substring(_info.Offset.User, delimiterAwareIdx - _info.Offset.User);
3261int idx = _info.Offset.Scheme;
3298idx = _info.Offset.User;
3299result = CheckCanonical(str, ref idx, _info.Offset.Host, '@');
3333idx = _info.Offset.Path;
3334origIdx = _info.Offset.Path;
3352_info.Offset.Scheme = 0;
3353_info.Offset.User = _string.Length;
3354_info.Offset.Host = _string.Length;
3357_info.Offset.Path = _string.Length;
3358idx = _info.Offset.Path;
3385_info.Offset.Query = idx;
3386_info.Offset.Fragment = str.Length; // There is no fragment in DisablePathAndQueryCanonicalization mode
3387_info.Offset.End = str.Length;
3460&& (_info.Offset.Path == length || (str[_info.Offset.Path] != '/' && str[_info.Offset.Path] != '\\')))
3568_info.Offset.Query = idx;
3616_info.Offset.Fragment = idx;
3643_info.Offset.End = idx;
3824Debug.Assert((_flags & Flags.Debug_LeftConstructor) == 0 || (!_syntax.IsSimple && Monitor.IsEntered(_info)));
4335if (_info.Offset.Path == _info.Offset.Query)
4349dest.Append(_string.AsSpan(_info.Offset.Path, _info.Offset.Query - _info.Offset.Path));
4374if (dosPathIdx != 0 && str[dosPathIdx + _info.Offset.Path - 1] == '|')
4377chars[dosPathIdx + _info.Offset.Path - 1] = ':';
4382str.Slice(_info.Offset.Path, _info.Offset.Query - _info.Offset.Path),
4387dest.Append(_string.AsSpan(_info.Offset.Path, _info.Offset.Query - _info.Offset.Path));
4408dest.Append(_string.AsSpan(_info.Offset.Path, _info.Offset.Query - _info.Offset.Path));