207 references to Offset
System.Private.Uri (207)
System\Uri.cs (195)
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;
2437string host = CreateHostStringHelper(_string, _info.Offset.Host, _info.Offset.Path, ref flags, ref _info.ScopeId);
2494if ((_info.Offset.Host + i) >= _info.Offset.End ||
2495host[i] != _string[_info.Offset.Host + i])
2609if ((_info.Offset.Host + i) >= _info.Offset.End || host[i] != _string[_info.Offset.Host + i])
2628_info.Offset.PortValue = 0;
2638if (port != _info.Offset.PortValue)
2646_info.Offset.PortValue = (ushort)port;
2681else if (IsDosPath && _string[_info.Offset.Path + SecuredPathIndex - 1] == '|')
2716else if (IsDosPath && _string[_info.Offset.Path + SecuredPathIndex - 1] == '|')
2790ReadOnlySpan<char> slice = str.AsSpan(_info.Offset.User, _info.Offset.Host - _info.Offset.User);
2899bool success = _info.Offset.PortValue.TryFormat(dest.AppendSpan(MaxUshortLength), out int charsWritten);
2927if ((parts & UriComponents.Query) != 0 && _info.Offset.Query < _info.Offset.Fragment)
2929int offset = (_info.Offset.Query + 1);
2942str.AsSpan(offset, _info.Offset.Fragment - offset),
2959UriHelper.UnescapeString(str, offset, _info.Offset.Fragment,
2966if ((parts & UriComponents.Fragment) != 0 && _info.Offset.Fragment < _info.Offset.End)
2968int offset = _info.Offset.Fragment + 1;
2981str.AsSpan(offset, _info.Offset.End - offset),
2998UriHelper.UnescapeString(str, offset, _info.Offset.End,
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),
3036":", _info.Offset.PortValue.ToString(CultureInfo.InvariantCulture));
3040if (_info.Offset.Scheme == 0 && _info.Offset.End == _string.Length)
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)
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)
3067return _string.Substring(_info.Offset.Scheme, _info.Offset.Fragment - _info.Offset.Scheme);
3073return _string.Substring(_info.Offset.Scheme, _info.Offset.User - _info.Offset.Scheme);
3079int idx = _info.Offset.Path;
3086return (idx - _info.Offset.Host == 0) ? string.Empty : _string.Substring(_info.Offset.Host,
3087idx - _info.Offset.Host);
3093_info.Offset.End > _info.Offset.Path && _string[_info.Offset.Path] == '/')
3094delimiterAwareIdx = _info.Offset.Path + 1;
3096delimiterAwareIdx = _info.Offset.Path;
3098if (delimiterAwareIdx >= _info.Offset.Query)
3102return _string.Substring(delimiterAwareIdx, _info.Offset.Query - delimiterAwareIdx);
3107delimiterAwareIdx = _info.Offset.Query + 1;
3109delimiterAwareIdx = _info.Offset.Query;
3111if (delimiterAwareIdx >= _info.Offset.Fragment)
3114return _string.Substring(delimiterAwareIdx, _info.Offset.Fragment - delimiterAwareIdx);
3119delimiterAwareIdx = _info.Offset.Fragment + 1;
3121delimiterAwareIdx = _info.Offset.Fragment;
3123if (delimiterAwareIdx >= _info.Offset.End)
3126return _string.Substring(delimiterAwareIdx, _info.Offset.End - delimiterAwareIdx);
3129return (_info.Offset.Path - _info.Offset.User == 0) ? string.Empty :
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),
3137":", _info.Offset.PortValue.ToString(CultureInfo.InvariantCulture));
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)
3152return _string.Substring(_info.Offset.Scheme, _info.Offset.End - _info.Offset.Scheme);
3155return _string.Substring(_info.Offset.Path, _info.Offset.End - _info.Offset.Path);
3164delimiterAwareIdx = _info.Offset.Host - 1;
3166delimiterAwareIdx = _info.Offset.Host;
3168if (_info.Offset.User >= delimiterAwareIdx)
3171return _string.Substring(_info.Offset.User, delimiterAwareIdx - _info.Offset.User);
3210int idx = _info.Offset.Scheme;
3247idx = _info.Offset.User;
3248result = CheckCanonical(str, ref idx, _info.Offset.Host, '@');
3282idx = _info.Offset.Path;
3283origIdx = _info.Offset.Path;
3302_info.Offset.Path = (ushort)_string.Length;
3303idx = _info.Offset.Path;
3330_info.Offset.Query = (ushort)idx;
3331_info.Offset.Fragment = (ushort)str.Length; // There is no fragment in DisablePathAndQueryCanonicalization mode
3332_info.Offset.End = (ushort)str.Length;
3411&& (_info.Offset.Path == length || (str[_info.Offset.Path] != '/' && str[_info.Offset.Path] != '\\')))
3525_info.Offset.Query = (ushort)idx;
3579_info.Offset.Fragment = (ushort)idx;
3606_info.Offset.End = (ushort)idx;
4299if (_info.Offset.Path == _info.Offset.Query)
4313dest.Append(_string.AsSpan(_info.Offset.Path, _info.Offset.Query - _info.Offset.Path));
4338if (dosPathIdx != 0 && str[dosPathIdx + _info.Offset.Path - 1] == '|')
4341chars[dosPathIdx + _info.Offset.Path - 1] = ':';
4346str.Slice(_info.Offset.Path, _info.Offset.Query - _info.Offset.Path),
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));