210 references to Offset
System.Private.Uri (210)
System\Uri.cs (198)
292char ch = _string[_info.Offset.Path];
972start = IsUncPath ? _info.Offset.Host - 2 : _info.Offset.Path;
974string str = (IsImplicitFile && _info.Offset.Host == (IsDosPath ? 0 : 2) &&
975_info.Offset.Query == _info.Offset.End)
978? _string.Substring(start + 1, _info.Offset.Query - start - 1)
979: _string.Substring(start, _info.Offset.Query - start);
997start = _info.Offset.Path;
1000result = new char[host.Length + 3 + _info.Offset.Fragment - _info.Offset.Path];
1026UriHelper.UnescapeString(_string, start, _info.Offset.Query, result, ref count, c_DummyChar,
1075return (int)_info.Offset.PortValue;
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);
1764int i1 = _info.Offset.Host;
1765int end1 = _info.Offset.Path;
1767int i2 = other._info.Offset.Host;
1768int end2 = other._info.Offset.Path;
1791if (i1 < _info.Offset.Path && _string[i1] != ':')
2216info.Offset.End = (ushort)_string.Length;
2232++info.Offset.Scheme;
2254++info.Offset.Scheme;
2279info.Offset.PortValue = (ushort)_syntax.DefaultPort;
2287info.Offset.User = (ushort)(cF & Flags.IndexMask);
2288info.Offset.Host = info.Offset.User;
2289info.Offset.Path = info.Offset.User;
2298info.Offset.User = (ushort)idx;
2303info.Offset.Host = (ushort)idx;
2304info.Offset.Path = (ushort)(cF & Flags.IndexMask);
2317info.Offset.Host = (ushort)idx;
2321info.Offset.Host = (ushort)idx;
2339info.Offset.Path = (ushort)idx;
2349info.Offset.End = (ushort)_originalUnicodeString.Length;
2351if (idx < info.Offset.End)
2360if (++idx < info.Offset.End)
2370for (++idx; idx < info.Offset.End; ++idx)
2383info.Offset.PortValue = (ushort)port;
2392info.Offset.Path = (ushort)idx;
2438string host = CreateHostStringHelper(_string, _info.Offset.Host, _info.Offset.Path, ref flags, _info);
2495if ((_info.Offset.Host + i) >= _info.Offset.End ||
2496host[i] != _string[_info.Offset.Host + i])
2615if ((_info.Offset.Host + i) >= _info.Offset.End || host[i] != _string[_info.Offset.Host + i])
2634_info.Offset.PortValue = 0;
2644if (port != _info.Offset.PortValue)
2652_info.Offset.PortValue = (ushort)port;
2687else if (IsDosPath && _string[_info.Offset.Path + SecuredPathIndex - 1] == '|')
2722else if (IsDosPath && _string[_info.Offset.Path + SecuredPathIndex - 1] == '|')
2796ReadOnlySpan<char> slice = str.AsSpan(_info.Offset.User, _info.Offset.Host - _info.Offset.User);
2905bool success = _info.Offset.PortValue.TryFormat(dest.AppendSpan(MaxUshortLength), out int charsWritten);
2933if ((parts & UriComponents.Query) != 0 && _info.Offset.Query < _info.Offset.Fragment)
2935int offset = (_info.Offset.Query + 1);
2948str.AsSpan(offset, _info.Offset.Fragment - offset),
2965UriHelper.UnescapeString(str, offset, _info.Offset.Fragment,
2972if ((parts & UriComponents.Fragment) != 0 && _info.Offset.Fragment < _info.Offset.End)
2974int offset = _info.Offset.Fragment + 1;
2987str.AsSpan(offset, _info.Offset.End - offset),
3004UriHelper.UnescapeString(str, offset, _info.Offset.End,
3026return _string.Substring(_info.Offset.Scheme, _info.Offset.Path - _info.Offset.Scheme);
3029_string.AsSpan(_info.Offset.Scheme, _info.Offset.User - _info.Offset.Scheme),
3030_string.AsSpan(_info.Offset.Host, _info.Offset.Path - _info.Offset.Host));
3039return _string.Substring(_info.Offset.Host, _info.Offset.Path - _info.Offset.Host);
3041return string.Concat(_string.AsSpan(_info.Offset.Host, _info.Offset.Path - _info.Offset.Host),
3042":", _info.Offset.PortValue.ToString(CultureInfo.InvariantCulture));
3046if (_info.Offset.Scheme == 0 && _info.Offset.End == _string.Length)
3049return _string.Substring(_info.Offset.Scheme, _info.Offset.End - _info.Offset.Scheme);
3056_string.AsSpan(_info.Offset.Scheme, _info.Offset.User - _info.Offset.Scheme),
3057_string.AsSpan(_info.Offset.Host, _info.Offset.Fragment - _info.Offset.Host));
3059if (_info.Offset.Scheme == 0 && _info.Offset.Fragment == _string.Length)
3062return _string.Substring(_info.Offset.Scheme, _info.Offset.Fragment - _info.Offset.Scheme);
3066return _string.Substring(_info.Offset.Scheme, _info.Offset.Path - _info.Offset.Scheme);
3070if (_info.Offset.Scheme == 0 && _info.Offset.Fragment == _string.Length)
3073return _string.Substring(_info.Offset.Scheme, _info.Offset.Fragment - _info.Offset.Scheme);
3079return _string.Substring(_info.Offset.Scheme, _info.Offset.User - _info.Offset.Scheme);
3085int idx = _info.Offset.Path;
3092return (idx - _info.Offset.Host == 0) ? string.Empty : _string.Substring(_info.Offset.Host,
3093idx - _info.Offset.Host);
3099_info.Offset.End > _info.Offset.Path && _string[_info.Offset.Path] == '/')
3100delimiterAwareIdx = _info.Offset.Path + 1;
3102delimiterAwareIdx = _info.Offset.Path;
3104if (delimiterAwareIdx >= _info.Offset.Query)
3108return _string.Substring(delimiterAwareIdx, _info.Offset.Query - delimiterAwareIdx);
3113delimiterAwareIdx = _info.Offset.Query + 1;
3115delimiterAwareIdx = _info.Offset.Query;
3117if (delimiterAwareIdx >= _info.Offset.Fragment)
3120return _string.Substring(delimiterAwareIdx, _info.Offset.Fragment - delimiterAwareIdx);
3125delimiterAwareIdx = _info.Offset.Fragment + 1;
3127delimiterAwareIdx = _info.Offset.Fragment;
3129if (delimiterAwareIdx >= _info.Offset.End)
3132return _string.Substring(delimiterAwareIdx, _info.Offset.End - delimiterAwareIdx);
3135return (_info.Offset.Path - _info.Offset.User == 0) ? string.Empty :
3136_string.Substring(_info.Offset.User, _info.Offset.Path - _info.Offset.User);
3142return string.Concat(_string.AsSpan(_info.Offset.User, _info.Offset.Path - _info.Offset.User),
3143":", _info.Offset.PortValue.ToString(CultureInfo.InvariantCulture));
3146return _string.Substring(_info.Offset.Path, _info.Offset.Fragment - _info.Offset.Path);
3152_string.AsSpan(_info.Offset.Scheme, _info.Offset.User - _info.Offset.Scheme),
3153_string.AsSpan(_info.Offset.Host, _info.Offset.End - _info.Offset.Host));
3155if (_info.Offset.Scheme == 0 && _info.Offset.End == _string.Length)
3158return _string.Substring(_info.Offset.Scheme, _info.Offset.End - _info.Offset.Scheme);
3161return _string.Substring(_info.Offset.Path, _info.Offset.End - _info.Offset.Path);
3170delimiterAwareIdx = _info.Offset.Host - 1;
3172delimiterAwareIdx = _info.Offset.Host;
3174if (_info.Offset.User >= delimiterAwareIdx)
3177return _string.Substring(_info.Offset.User, delimiterAwareIdx - _info.Offset.User);
3216int idx = _info.Offset.Scheme;
3253idx = _info.Offset.User;
3254result = CheckCanonical(str, ref idx, _info.Offset.Host, '@');
3288idx = _info.Offset.Path;
3289origIdx = _info.Offset.Path;
3307_info.Offset.Scheme = 0;
3308_info.Offset.User = (ushort)_string.Length;
3309_info.Offset.Host = (ushort)_string.Length;
3312_info.Offset.Path = (ushort)_string.Length;
3313idx = _info.Offset.Path;
3340_info.Offset.Query = (ushort)idx;
3341_info.Offset.Fragment = (ushort)str.Length; // There is no fragment in DisablePathAndQueryCanonicalization mode
3342_info.Offset.End = (ushort)str.Length;
3421&& (_info.Offset.Path == length || (str[_info.Offset.Path] != '/' && str[_info.Offset.Path] != '\\')))
3535_info.Offset.Query = (ushort)idx;
3589_info.Offset.Fragment = (ushort)idx;
3616_info.Offset.End = (ushort)idx;
4312if (_info.Offset.Path == _info.Offset.Query)
4326dest.Append(_string.AsSpan(_info.Offset.Path, _info.Offset.Query - _info.Offset.Path));
4351if (dosPathIdx != 0 && str[dosPathIdx + _info.Offset.Path - 1] == '|')
4354chars[dosPathIdx + _info.Offset.Path - 1] = ':';
4359str.Slice(_info.Offset.Path, _info.Offset.Query - _info.Offset.Path),
4364dest.Append(_string.AsSpan(_info.Offset.Path, _info.Offset.Query - _info.Offset.Path));
4385dest.Append(_string.AsSpan(_info.Offset.Path, _info.Offset.Query - _info.Offset.Path));