10 for (
int i = 0; i < numbers.
Length; i++)
35 if (numbers[0] == 0 && numbers[1] == 0 && numbers[2] == 0 && numbers[3] == 0 && numbers[6] != 0)
37 if (numbers[4] == 0 && (numbers[5] == 0 || numbers[5] == ushort.MaxValue))
41 if (numbers[4] == ushort.MaxValue && numbers[5] == 0)
48 return numbers[5] == 24318;
71 for (
int i =
start; i < end; i++)
144 if (i > 0 && name[i - 1] ==
':')
170 if (i + 1 < end && name[i + 1] !=
':')
174 if (i + 3 < end && name[i + 2] ==
'0' && name[i + 3] ==
'x')
176 for (i += 4; i < end; i++)
185 for (i += 2; i < end; i++)
187 if (name[i] <
'0' || name[i] >
'9')
201 if (!flag3 && (flag ? (num < 8) : (num == 8)))
215 if (address[
start] ==
'[')
220 while (i < address.
Length && address[i] !=
']')
227 numbers[num2++] = (ushort)num;
231 for (i++; i < address.Length && address[i] !=
']' && address[i] !=
'/'; i++)
235 for (; i < address.Length && address[i] !=
']'; i++)
241 numbers[num2++] = (ushort)num;
244 if (address[i] ==
':')
249 else if (num3 < 0 && num2 < 6)
253 for (
int j = i; j < address.Length && address[j] !=
']' && address[j] !=
':' && address[j] !=
'%' && address[j] !=
'/' && j < i + 4; j++)
255 if (address[j] ==
'.')
257 for (; j < address.Length && address[j] !=
']' && address[j] !=
'/' && address[j] !=
'%'; j++)
261 numbers[num2++] = (ushort)(num >> 16);
262 numbers[num2++] = (ushort)num;
274 numbers[num2++] = (ushort)num;
277 for (i++; address[i] !=
']'; i++)
279 num4 = num4 * 10 + (address[i] - 48);
289 numbers[num2++] = (ushort)num;
299 for (
int num7 = num2 - num3; num7 > 0; num7--)
301 numbers[num5--] = numbers[num6];
static unsafe bool IsValid(char *name, int start, ref int end, bool allowIPv6, bool notImplicitFile, bool unknownScheme)
static int ParseHostNumber(ReadOnlySpan< char > str, int start, int end)
static unsafe bool IsValidStrict(char *name, int start, ref int end)
static void Parse(ReadOnlySpan< char > address, Span< ushort > numbers, int start, ref string scopeId)
static int longestSequenceStart
static bool ShouldHaveIpv4Embedded(ReadOnlySpan< ushort > numbers)
static int int longestSequenceLength FindCompressionRange(ReadOnlySpan< ushort > numbers)
static int FromHex(char digit)
static bool IsHexDigit(char character)
ReadOnlySpan< T > Slice(int start)