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

◆ GetNameValueListLength()

static int System.Net.Http.Headers.NameValueHeaderValue.GetNameValueListLength ( string input,
int startIndex,
char delimiter,
ObjectCollection< NameValueHeaderValue > nameValueCollection )
inlinestaticpackageinherited

Definition at line 202 of file NameValueHeaderValue.cs.

203 {
204 if (string.IsNullOrEmpty(input) || startIndex >= input.Length)
205 {
206 return 0;
207 }
208 int num = startIndex + HttpRuleParser.GetWhitespaceLength(input, startIndex);
209 while (true)
210 {
211 NameValueHeaderValue parsedValue;
212 int nameValueLength = GetNameValueLength(input, num, s_defaultNameValueCreator, out parsedValue);
213 if (nameValueLength == 0)
214 {
215 return 0;
216 }
217 nameValueCollection.Add(parsedValue);
218 num += nameValueLength;
219 num += HttpRuleParser.GetWhitespaceLength(input, num);
220 if (num == input.Length || input[num] != delimiter)
221 {
222 break;
223 }
224 num++;
225 num += HttpRuleParser.GetWhitespaceLength(input, num);
226 }
227 return num - startIndex;
228 }
static int GetNameValueLength(string input, int startIndex, out NameValueHeaderValue parsedValue)
static readonly Func< NameValueHeaderValue > s_defaultNameValueCreator

References System.Net.Http.Headers.ObjectCollection< T >.Add(), System.Net.Http.Headers.NameValueHeaderValue.GetNameValueLength(), System.Net.Http.HttpRuleParser.GetWhitespaceLength(), System.input, System.Net.Http.Headers.NameValueHeaderValue.s_defaultNameValueCreator, and System.startIndex.

Referenced by System.Net.Http.Headers.ContentDispositionHeaderValue.GetDispositionTypeLength(), System.Net.Http.Headers.MediaTypeHeaderValue.GetMediaTypeLength(), System.Net.Http.Headers.NameValueWithParametersHeaderValue.GetNameValueWithParametersLength(), and System.Net.Http.Headers.TransferCodingHeaderValue.GetTransferCodingLength().