211 references to Offset
System.Private.Uri (211)
System\Uri.cs (199)
155Offset offset = info.Offset;
339char ch = _string[_info.Offset.Path];
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;
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;
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] != ':')
2263info.Offset.End = _string.Length;
2279++info.Offset.Scheme;
2301++info.Offset.Scheme;
2326info.Offset.PortValue = (ushort)_syntax.DefaultPort;
2334info.Offset.User = (int)(cF & Flags.IndexMask);
2335info.Offset.Host = info.Offset.User;
2336info.Offset.Path = info.Offset.User;
2345info.Offset.User = idx;
2350info.Offset.Host = idx;
2351info.Offset.Path = (int)(cF & Flags.IndexMask);
2364info.Offset.Host = idx;
2368info.Offset.Host = idx;
2385info.Offset.Path = idx;
2395info.Offset.End = _originalUnicodeString.Length;
2397if (idx < info.Offset.End)
2406if (++idx < info.Offset.End)
2416for (++idx; idx < info.Offset.End; ++idx)
2429info.Offset.PortValue = (ushort)port;
2438info.Offset.Path = idx;
2484string host = CreateHostStringHelper(_string, _info.Offset.Host, _info.Offset.Path, ref flags, _info);
2541if ((_info.Offset.Host + i) >= _info.Offset.End ||
2542host[i] != _string[_info.Offset.Host + i])
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;
2730else if (IsDosPath && _string[_info.Offset.Path + SecuredPathIndex - 1] == '|')
2765else if (IsDosPath && _string[_info.Offset.Path + SecuredPathIndex - 1] == '|')
2841ReadOnlySpan<char> slice = str.AsSpan(_info.Offset.User, _info.Offset.Host - _info.Offset.User);
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;
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));