Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ TryGetParametersEndIndex()

static bool System.Net.Http.Headers.AuthenticationHeaderValue.TryGetParametersEndIndex ( string input,
ref int parseEndIndex,
ref int parameterEndIndex )
inlinestaticprivate

Definition at line 175 of file AuthenticationHeaderValue.cs.

176 {
177 int num = parseEndIndex;
178 do
179 {
180 num++;
181 bool separatorFound = false;
182 num = HeaderUtilities.GetNextNonEmptyOrWhitespaceIndex(input, num, skipEmptyValues: true, out separatorFound);
183 if (num == input.Length)
184 {
185 return true;
186 }
187 int tokenLength = HttpRuleParser.GetTokenLength(input, num);
188 if (tokenLength == 0)
189 {
190 return false;
191 }
192 num += tokenLength;
193 num += HttpRuleParser.GetWhitespaceLength(input, num);
194 if (num == input.Length || input[num] != '=')
195 {
196 return true;
197 }
198 num++;
199 num += HttpRuleParser.GetWhitespaceLength(input, num);
200 int valueLength = NameValueHeaderValue.GetValueLength(input, num);
201 if (valueLength == 0)
202 {
203 return false;
204 }
205 num += valueLength;
206 parameterEndIndex = num - 1;
207 num = (parseEndIndex = num + HttpRuleParser.GetWhitespaceLength(input, num));
208 }
209 while (num < input.Length && input[num] == ',');
210 return true;
211 }

References System.Net.Http.Headers.HeaderUtilities.GetNextNonEmptyOrWhitespaceIndex(), System.Net.Http.HttpRuleParser.GetTokenLength(), System.Net.Http.Headers.NameValueHeaderValue.GetValueLength(), System.Net.Http.HttpRuleParser.GetWhitespaceLength(), and System.input.

Referenced by System.Net.Http.Headers.AuthenticationHeaderValue.GetAuthenticationLength().