5 writes to _info
System.Private.Uri (5)
224 references to _info
System.Private.Uri (224)
System\Uri.cs (209)
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);
1047string host = _info.Host;
1048start = _info.Offset.Path;
1068ReadOnlySpan<char> path = _string.AsSpan(start, _info.Offset.Query - start);
1125return (int)_info.Offset.PortValue;
1209return _info.Host!;
1224if (_info?.IdnHost is null)
1228string host = _info.Host!;
1237host = _info._moreInfo?.ScopeId is string scopeId ?
1249_info.IdnHost = host;
1252return _info.IdnHost;
1592return _info.String ??=
1615if (_info.String is not null)
1617result = _info.String;
1647(IsDosPath && _string[_info.Offset.Path + SecuredPathIndex - 1] == '|')) // A rare case of c|\
1657result = _string.AsSpan(_info.Offset.Scheme, _info.Offset.End - _info.Offset.Scheme);
1795int i1 = _info.Offset.Host;
1796int end1 = _info.Offset.Path;
1798int i2 = other._info.Offset.Host;
1799int end2 = other._info.Offset.Path;
1822if (i1 < _info.Offset.Path && _string[i1] != ':')
1836if (!_info.Host!.Equals(other._info.Host))
1851MoreInfo selfInfo = _info.MoreInfo;
1852MoreInfo otherInfo = other._info.MoreInfo;
2449lock (_info)
2465string host = CreateHostStringHelper(_string, _info.Offset.Host, _info.Offset.Path, ref flags, _info);
2513if (_info._moreInfo?.ScopeId is not null)
2522if ((_info.Offset.Host + i) >= _info.Offset.End ||
2523host[i] != _string[_info.Offset.Host + i])
2533_info.Host = host;
2605if (_info.Host != null)
2611if (_info.Host is null)
2635host = CreateHostStringHelper(host, 0, host.Length, ref flags, _info);
2639if ((_info.Offset.Host + i) >= _info.Offset.End || host[i] != _string[_info.Offset.Host + i])
2658_info.Offset.PortValue = 0;
2668if (port != _info.Offset.PortValue)
2676_info.Offset.PortValue = (ushort)port;
2680_info.Host = host;
2693Debug.Assert(_info != null && (_flags & Flags.MinimalUriInfoSet) != 0);
2711else if (IsDosPath && _string[_info.Offset.Path + SecuredPathIndex - 1] == '|')
2732Debug.Assert(_info != null && (_flags & Flags.MinimalUriInfoSet) != 0);
2746else if (IsDosPath && _string[_info.Offset.Path + SecuredPathIndex - 1] == '|')
2822ReadOnlySpan<char> slice = str.AsSpan(_info.Offset.User, _info.Offset.Host - _info.Offset.User);
2872string host = _info.Host!;
2915if ((parts & UriComponents.SerializationInfoString) != 0 && HostType == Flags.IPv6HostType && _info._moreInfo?.ScopeId is string scopeId)
2931bool success = _info.Offset.PortValue.TryFormat(dest.AppendSpan(MaxUshortLength), out int charsWritten);
2959if ((parts & UriComponents.Query) != 0 && _info.Offset.Query < _info.Offset.Fragment)
2961int offset = (_info.Offset.Query + 1);
2965FormatQueryOrFragment(str.AsSpan(offset, _info.Offset.Fragment - offset), ref dest, nonCanonical, formatAs, isQuery: true);
2969if ((parts & UriComponents.Fragment) != 0 && _info.Offset.Fragment < _info.Offset.End)
2971int offset = _info.Offset.Fragment + 1;
2975FormatQueryOrFragment(str.AsSpan(offset, _info.Offset.End - offset), ref dest, nonCanonical, formatAs, isQuery: false);
3033return _string.Substring(_info.Offset.Scheme, _info.Offset.Path - _info.Offset.Scheme);
3036_string.AsSpan(_info.Offset.Scheme, _info.Offset.User - _info.Offset.Scheme),
3037_string.AsSpan(_info.Offset.Host, _info.Offset.Path - _info.Offset.Host));
3046return _string.Substring(_info.Offset.Host, _info.Offset.Path - _info.Offset.Host);
3048return string.Concat(_string.AsSpan(_info.Offset.Host, _info.Offset.Path - _info.Offset.Host),
3049":", _info.Offset.PortValue.ToString(CultureInfo.InvariantCulture));
3053if (_info.Offset.Scheme == 0 && _info.Offset.End == _string.Length)
3056return _string.Substring(_info.Offset.Scheme, _info.Offset.End - _info.Offset.Scheme);
3063_string.AsSpan(_info.Offset.Scheme, _info.Offset.User - _info.Offset.Scheme),
3064_string.AsSpan(_info.Offset.Host, _info.Offset.Fragment - _info.Offset.Host));
3066if (_info.Offset.Scheme == 0 && _info.Offset.Fragment == _string.Length)
3069return _string.Substring(_info.Offset.Scheme, _info.Offset.Fragment - _info.Offset.Scheme);
3073return _string.Substring(_info.Offset.Scheme, _info.Offset.Path - _info.Offset.Scheme);
3077if (_info.Offset.Scheme == 0 && _info.Offset.Fragment == _string.Length)
3080return _string.Substring(_info.Offset.Scheme, _info.Offset.Fragment - _info.Offset.Scheme);
3086return _string.Substring(_info.Offset.Scheme, _info.Offset.User - _info.Offset.Scheme);
3092int idx = _info.Offset.Path;
3099return (idx - _info.Offset.Host == 0) ? string.Empty : _string.Substring(_info.Offset.Host,
3100idx - _info.Offset.Host);
3106_info.Offset.End > _info.Offset.Path && _string[_info.Offset.Path] == '/')
3107delimiterAwareIdx = _info.Offset.Path + 1;
3109delimiterAwareIdx = _info.Offset.Path;
3111if (delimiterAwareIdx >= _info.Offset.Query)
3115return _string.Substring(delimiterAwareIdx, _info.Offset.Query - delimiterAwareIdx);
3120delimiterAwareIdx = _info.Offset.Query + 1;
3122delimiterAwareIdx = _info.Offset.Query;
3124if (delimiterAwareIdx >= _info.Offset.Fragment)
3127return _string.Substring(delimiterAwareIdx, _info.Offset.Fragment - delimiterAwareIdx);
3132delimiterAwareIdx = _info.Offset.Fragment + 1;
3134delimiterAwareIdx = _info.Offset.Fragment;
3136if (delimiterAwareIdx >= _info.Offset.End)
3139return _string.Substring(delimiterAwareIdx, _info.Offset.End - delimiterAwareIdx);
3142return (_info.Offset.Path - _info.Offset.User == 0) ? string.Empty :
3143_string.Substring(_info.Offset.User, _info.Offset.Path - _info.Offset.User);
3149return string.Concat(_string.AsSpan(_info.Offset.User, _info.Offset.Path - _info.Offset.User),
3150":", _info.Offset.PortValue.ToString(CultureInfo.InvariantCulture));
3153return _string.Substring(_info.Offset.Path, _info.Offset.Fragment - _info.Offset.Path);
3159_string.AsSpan(_info.Offset.Scheme, _info.Offset.User - _info.Offset.Scheme),
3160_string.AsSpan(_info.Offset.Host, _info.Offset.End - _info.Offset.Host));
3162if (_info.Offset.Scheme == 0 && _info.Offset.End == _string.Length)
3165return _string.Substring(_info.Offset.Scheme, _info.Offset.End - _info.Offset.Scheme);
3168return _string.Substring(_info.Offset.Path, _info.Offset.End - _info.Offset.Path);
3177delimiterAwareIdx = _info.Offset.Host - 1;
3179delimiterAwareIdx = _info.Offset.Host;
3181if (_info.Offset.User >= delimiterAwareIdx)
3184return _string.Substring(_info.Offset.User, delimiterAwareIdx - _info.Offset.User);
3223int idx = _info.Offset.Scheme;
3260idx = _info.Offset.User;
3261result = CheckCanonical(str, ref idx, _info.Offset.Host, '@');
3295idx = _info.Offset.Path;
3296origIdx = _info.Offset.Path;
3314_info.Offset.Scheme = 0;
3315_info.Offset.User = _string.Length;
3316_info.Offset.Host = _string.Length;
3319_info.Offset.Path = _string.Length;
3320idx = _info.Offset.Path;
3347_info.Offset.Query = idx;
3348_info.Offset.Fragment = str.Length; // There is no fragment in DisablePathAndQueryCanonicalization mode
3349_info.Offset.End = str.Length;
3422&& (_info.Offset.Path == length || (str[_info.Offset.Path] != '/' && str[_info.Offset.Path] != '\\')))
3530_info.Offset.Query = idx;
3578_info.Offset.Fragment = idx;
3605_info.Offset.End = idx;
3786Debug.Assert((_flags & Flags.Debug_LeftConstructor) == 0 || (!_syntax.IsSimple && Monitor.IsEntered(_info)));
4308if (_info.Offset.Path == _info.Offset.Query)
4322dest.Append(_string.AsSpan(_info.Offset.Path, _info.Offset.Query - _info.Offset.Path));
4341if (dosPathIdx != 0 && str[dosPathIdx + _info.Offset.Path - 1] == '|')
4344chars[dosPathIdx + _info.Offset.Path - 1] = ':';
4349str.Slice(_info.Offset.Path, _info.Offset.Query - _info.Offset.Path),
4354dest.Append(_string.AsSpan(_info.Offset.Path, _info.Offset.Query - _info.Offset.Path));
4375dest.Append(_string.AsSpan(_info.Offset.Path, _info.Offset.Query - _info.Offset.Path));