233 references to Offset
System (233)
net\System\URI.cs (221)
332
char ch = m_String[m_Info.
Offset
.Path];
1048
start = IsUncPath? m_Info.
Offset
.Host-2 :m_Info.
Offset
.Path;
1050
string str = (IsImplicitFile && m_Info.
Offset
.Host == (IsDosPath ? 0 : 2) &&
1051
m_Info.
Offset
.Query == m_Info.
Offset
.End)
1054
? m_String.Substring(start + 1, m_Info.
Offset
.Query - start - 1)
1055
: m_String.Substring(start, m_Info.
Offset
.Query - start);
1079
start = m_Info.
Offset
.Path;
1082
result = new char [host.Length + 3 + m_Info.
Offset
.Fragment - m_Info.
Offset
.Path ];
1107
UriHelper.UnescapeString(m_String, start, m_Info.
Offset
.Query, result, ref count, c_DummyChar,
1158
return (int)m_Info.
Offset
.PortValue;
1809
ushort i1 = m_Info.
Offset
.Host;
1810
ushort end1 = m_Info.
Offset
.Path;
1812
ushort i2 = obj.m_Info.
Offset
.Host;
1813
ushort end2 = obj.m_Info.
Offset
.Path;
1832
if (i1 < m_Info.
Offset
.Path && m_String[i1] != ':') {
2270
info.
Offset
.End = (ushort)m_String.Length;
2284
++info.
Offset
.Scheme;
2303
++info.
Offset
.Scheme;
2327
info.
Offset
.PortValue = (ushort)m_Syntax.DefaultPort;
2336
info.
Offset
.User = (ushort) (cF & Flags.IndexMask);
2337
info.
Offset
.Host = info.
Offset
.User;
2338
info.
Offset
.Path = info.
Offset
.User;
2346
info.
Offset
.User = idx;
2350
info.
Offset
.Host = idx;
2351
info.
Offset
.Path = (ushort) (cF & Flags.IndexMask);
2362
info.
Offset
.Host = idx;
2365
info.
Offset
.Host = idx;
2382
info.
Offset
.Path = idx;
2396
info.
Offset
.End = (ushort)m_originalUnicodeString.Length;
2398
if (idx < info.
Offset
.End ){
2404
if (++idx < info.
Offset
.End){
2412
for (++idx; idx < info.
Offset
.End; ++idx){
2422
if (notEmpty && info.
Offset
.PortValue != (ushort)port){
2423
info.
Offset
.PortValue = (ushort)port;
2431
info.
Offset
.Path = (ushort)idx;
2486
string host = CreateHostStringHelper(m_String, m_Info.
Offset
.Host, m_Info.
Offset
.Path, ref flags, ref m_Info.ScopeId);
2540
if ((m_Info.
Offset
.Host + i) >= m_Info.
Offset
.End ||
2541
host[i] != m_String[m_Info.
Offset
.Host + i]) {
2656
if ((m_Info.
Offset
.Host + i) >= m_Info.
Offset
.End || host[i] != m_String[m_Info.
Offset
.Host + i]) {
2674
m_Info.
Offset
.PortValue = 0;
2684
if (port != m_Info.
Offset
.PortValue)
2692
m_Info.
Offset
.PortValue = (ushort) port;
2723
else if (IsDosPath && m_String[m_Info.
Offset
.Path + SecuredPathIndex - 1] == '|') {
2750
else if (IsDosPath && m_String[m_Info.
Offset
.Path + SecuredPathIndex - 1] == '|') {
2780
int count = (m_Info.
Offset
.End-m_Info.
Offset
.User) * (formatAs == UriFormat.UriEscaped?12:1);
2805
chars = UriHelper.EscapeString(m_String, m_Info.
Offset
.User, m_Info.
Offset
.Host, chars,
2813
m_String.CopyTo(m_Info.
Offset
.User, chars, count, m_Info.
Offset
.Host - m_Info.
Offset
.User);
2814
count += (m_Info.
Offset
.Host - m_Info.
Offset
.User);
2819
chars = UriHelper.UnescapeString(m_String, m_Info.
Offset
.User, m_Info.
Offset
.Host - 1,
2826
chars = UriHelper.UnescapeString(m_String, m_Info.
Offset
.User, m_Info.
Offset
.Host, chars,
2832
chars = UriHelper.UnescapeString(m_String, m_Info.
Offset
.User, m_Info.
Offset
.Host, chars,
2839
UriHelper.UnescapeString(m_String, m_Info.
Offset
.User, m_Info.
Offset
.Host, chars, ref count,
2904
ushort start = m_Info.
Offset
.Path;
2908
m_String.CopyTo(start, chars, count, m_Info.
Offset
.Path - start);
2909
count += (m_Info.
Offset
.Path - start);
2913
stemp = m_Info.
Offset
.PortValue.ToString(CultureInfo.InvariantCulture);
2922
stemp = m_Info.
Offset
.PortValue.ToString(CultureInfo.InvariantCulture);
2951
if ((parts & UriComponents.Query) != 0 && m_Info.
Offset
.Query < m_Info.
Offset
.Fragment)
2953
delimiterAwareIndex = (ushort)(m_Info.
Offset
.Query+1);
2964
chars = UriHelper.EscapeString(m_String, delimiterAwareIndex, m_Info.
Offset
.Fragment, chars,
2971
UriHelper.UnescapeString(m_String, delimiterAwareIndex, m_Info.
Offset
.Fragment, chars,
2979
chars = UriHelper.UnescapeString(m_String, delimiterAwareIndex, m_Info.
Offset
.Fragment, chars,
2987
chars = UriHelper.UnescapeString(m_String, delimiterAwareIndex, m_Info.
Offset
.Fragment, chars,
2994
chars = UriHelper.UnescapeString(m_String, delimiterAwareIndex, m_Info.
Offset
.Fragment, chars,
3002
UriHelper.UnescapeString(m_String, delimiterAwareIndex, m_Info.
Offset
.Fragment, chars, ref count,
3008
if ((parts & UriComponents.Fragment) != 0 && m_Info.
Offset
.Fragment < m_Info.
Offset
.End)
3010
delimiterAwareIndex = (ushort)(m_Info.
Offset
.Fragment+1);
3019
chars = UriHelper.EscapeString(m_String, delimiterAwareIndex, m_Info.
Offset
.End, chars,
3026
UriHelper.UnescapeString(m_String, delimiterAwareIndex, m_Info.
Offset
.End, chars,
3034
chars = UriHelper.UnescapeString(m_String, delimiterAwareIndex, m_Info.
Offset
.End, chars,
3041
chars = UriHelper.UnescapeString(m_String, delimiterAwareIndex, m_Info.
Offset
.End, chars,
3048
chars = UriHelper.UnescapeString(m_String, delimiterAwareIndex, m_Info.
Offset
.End, chars,
3056
UriHelper.UnescapeString(m_String, delimiterAwareIndex, m_Info.
Offset
.End, chars, ref count,
3076
return m_String.Substring(m_Info.
Offset
.Scheme, m_Info.
Offset
.Path - m_Info.
Offset
.Scheme);
3078
return m_String.Substring(m_Info.
Offset
.Scheme, m_Info.
Offset
.User - m_Info.
Offset
.Scheme)
3079
+ m_String.Substring(m_Info.
Offset
.Host, m_Info.
Offset
.Path - m_Info.
Offset
.Host);
3088
return m_String.Substring(m_Info.
Offset
.Host, m_Info.
Offset
.Path - m_Info.
Offset
.Host);
3090
return m_String.Substring(m_Info.
Offset
.Host, m_Info.
Offset
.Path - m_Info.
Offset
.Host)
3091
+ ':' + m_Info.
Offset
.PortValue.ToString(CultureInfo.InvariantCulture);
3095
if (m_Info.
Offset
.Scheme == 0 && m_Info.
Offset
.End == m_String.Length)
3098
return m_String.Substring(m_Info.
Offset
.Scheme, m_Info.
Offset
.End - m_Info.
Offset
.Scheme);
3103
return m_String.Substring(m_Info.
Offset
.Scheme, m_Info.
Offset
.User - m_Info.
Offset
.Scheme)
3104
+ m_String.Substring(m_Info.
Offset
.Host, m_Info.
Offset
.Fragment - m_Info.
Offset
.Host);
3106
if (m_Info.
Offset
.Scheme == 0 && m_Info.
Offset
.Fragment == m_String.Length)
3109
return m_String.Substring(m_Info.
Offset
.Scheme, m_Info.
Offset
.Fragment - m_Info.
Offset
.Scheme);
3113
return m_String.Substring(m_Info.
Offset
.Scheme, m_Info.
Offset
.Path - m_Info.
Offset
.Scheme);
3117
if (m_Info.
Offset
.Scheme == 0 && m_Info.
Offset
.Fragment == m_String.Length)
3120
return m_String.Substring(m_Info.
Offset
.Scheme, m_Info.
Offset
.Fragment - m_Info.
Offset
.Scheme);
3126
return m_String.Substring(m_Info.
Offset
.Scheme, m_Info.
Offset
.User - m_Info.
Offset
.Scheme);
3132
ushort idx = m_Info.
Offset
.Path;
3138
return (idx - m_Info.
Offset
.Host == 0)? string.Empty: m_String.Substring(m_Info.
Offset
.Host,
3139
idx - m_Info.
Offset
.Host);
3145
m_Info.
Offset
.End > m_Info.
Offset
.Path && m_String[m_Info.
Offset
.Path] == '/')
3146
delimiterAwareIdx = (ushort)(m_Info.
Offset
.Path + 1);
3148
delimiterAwareIdx = m_Info.
Offset
.Path;
3150
if (delimiterAwareIdx >= m_Info.
Offset
.Query)
3154
return m_String.Substring(delimiterAwareIdx, m_Info.
Offset
.Query - delimiterAwareIdx);
3159
delimiterAwareIdx = (ushort)(m_Info.
Offset
.Query + 1);
3161
delimiterAwareIdx = m_Info.
Offset
.Query;
3163
if (delimiterAwareIdx >= m_Info.
Offset
.Fragment)
3166
return m_String.Substring(delimiterAwareIdx, m_Info.
Offset
.Fragment - delimiterAwareIdx);
3171
delimiterAwareIdx = (ushort)(m_Info.
Offset
.Fragment + 1);
3173
delimiterAwareIdx = m_Info.
Offset
.Fragment;
3175
if (delimiterAwareIdx >= m_Info.
Offset
.End)
3178
return m_String.Substring(delimiterAwareIdx, m_Info.
Offset
.End - delimiterAwareIdx);
3181
return (m_Info.
Offset
.Path - m_Info.
Offset
.User == 0) ? string.Empty :
3182
m_String.Substring(m_Info.
Offset
.User, m_Info.
Offset
.Path - m_Info.
Offset
.User);
3188
return m_String.Substring(m_Info.
Offset
.User, m_Info.
Offset
.Path - m_Info.
Offset
.User)
3189
+ ':' + m_Info.
Offset
.PortValue.ToString(CultureInfo.InvariantCulture);
3192
return m_String.Substring(m_Info.
Offset
.Path, m_Info.
Offset
.Fragment - m_Info.
Offset
.Path);
3196
return m_String.Substring(m_Info.
Offset
.Scheme, m_Info.
Offset
.User - m_Info.
Offset
.Scheme)
3197
+ m_String.Substring(m_Info.
Offset
.Host, m_Info.
Offset
.End - m_Info.
Offset
.Host);
3199
if (m_Info.
Offset
.Scheme == 0 && m_Info.
Offset
.End == m_String.Length)
3202
return m_String.Substring(m_Info.
Offset
.Scheme, m_Info.
Offset
.End - m_Info.
Offset
.Scheme);
3205
return m_String.Substring(m_Info.
Offset
.Path, m_Info.
Offset
.End - m_Info.
Offset
.Path);
3214
delimiterAwareIdx = (ushort)(m_Info.
Offset
.Host - 1);
3216
delimiterAwareIdx = m_Info.
Offset
.Host;
3218
if (m_Info.
Offset
.User >= delimiterAwareIdx)
3221
return m_String.Substring(m_Info.
Offset
.User, delimiterAwareIdx - m_Info.
Offset
.User);
3252
ushort idx = m_Info.
Offset
.Scheme;
3293
idx = m_Info.
Offset
.User;
3294
result = CheckCanonical(str, ref idx, m_Info.
Offset
.Host, '@');
3325
idx = m_Info.
Offset
.Path;
3326
origIdx = m_Info.
Offset
.Path;
3343
m_Info.
Offset
.Path = (ushort)m_String.Length;
3344
idx = m_Info.
Offset
.Path;
3399
&& (m_Info.
Offset
.Path == length || (str[m_Info.
Offset
.Path] != '/' && str[m_Info.
Offset
.Path] != '\\'))){
3501
m_Info.
Offset
.Query = idx;
3559
m_Info.
Offset
.Fragment = idx;
3582
m_Info.
Offset
.End = idx;
4579
if (m_Info.
Offset
.Path == m_Info.
Offset
.Query)
4593
m_String.CopyTo(m_Info.
Offset
.Path, dest, end, m_Info.
Offset
.Query - m_Info.
Offset
.Path);
4594
end += (m_Info.
Offset
.Query - m_Info.
Offset
.Path);
4616
if (dosPathIdx != 0 && str[dosPathIdx + m_Info.
Offset
.Path -1] == '|')
4618
str = str.Remove(dosPathIdx + m_Info.
Offset
.Path -1, 1);
4619
str = str.Insert(dosPathIdx + m_Info.
Offset
.Path -1, ":");
4621
dest = UriHelper.EscapeString(str, m_Info.
Offset
.Path, m_Info.
Offset
.Query, dest, ref end, true,
4625
m_String.CopyTo(m_Info.
Offset
.Path, dest, end, m_Info.
Offset
.Query - m_Info.
Offset
.Path);
4626
end += (m_Info.
Offset
.Query - m_Info.
Offset
.Path);
4632
m_String.CopyTo(m_Info.
Offset
.Path, dest, end, m_Info.
Offset
.Query - m_Info.
Offset
.Path);
4633
end += (m_Info.
Offset
.Query - m_Info.
Offset
.Path);
net\System\UriExt.cs (12)
526
idx = (ushort)(m_Info.
Offset
.Scheme + m_Syntax.SchemeName.Length + 2);
527
if (idx >= m_Info.
Offset
.User || m_String[idx - 1] == '\\' || m_String[idx] == '\\')
533
while (++idx < m_Info.
Offset
.User && (m_String[idx] == '/' || m_String[idx] == '\\'))
544
if (InFact(Flags.FirstSlashAbsent) && m_Info.
Offset
.Query > m_Info.
Offset
.Path)
554
if (IsDosPath && m_String[m_Info.
Offset
.Path + SecuredPathIndex - 1] == '|')
566
idx = m_Info.
Offset
.User;
567
Check result = CheckCanonical(str, ref idx, (ushort)m_Info.
Offset
.Path, '/');
897
return m_Info.
Offset
.PortValue.ToString(CultureInfo.InvariantCulture);
1004
int portIndex = otherUri.m_Info.
Offset
.Path;
1008
while (otherUri.m_String[portIndex] != ':' && portIndex > otherUri.m_Info.
Offset
.Host)
1016
portIndex = otherUri.m_Info.
Offset
.Path;