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

◆ AddHeaderInfo()

void System.Net.Http.Headers.HttpHeaders.AddHeaderInfo ( HeaderDescriptor descriptor,
HeaderStoreItemInfo sourceInfo )
inlineprivateinherited

Definition at line 484 of file HttpHeaders.cs.

485 {
486 HeaderStoreItemInfo headerStoreItemInfo = CreateAndAddHeaderToStore(descriptor);
487 headerStoreItemInfo.RawValue = CloneStringHeaderInfoValues(sourceInfo.RawValue);
488 if (descriptor.Parser == null)
489 {
490 headerStoreItemInfo.ParsedValue = CloneStringHeaderInfoValues(sourceInfo.ParsedValue);
491 return;
492 }
493 headerStoreItemInfo.InvalidValue = CloneStringHeaderInfoValues(sourceInfo.InvalidValue);
494 if (sourceInfo.ParsedValue == null)
495 {
496 return;
497 }
498 if (!(sourceInfo.ParsedValue is List<object> list))
499 {
501 return;
502 }
503 foreach (object item in list)
504 {
506 }
507 }
HeaderStoreItemInfo CreateAndAddHeaderToStore(HeaderDescriptor descriptor)
static void CloneAndAddValue(HeaderStoreItemInfo destinationInfo, object source)
static object CloneStringHeaderInfoValues(object source)

References System.Net.Http.Headers.HttpHeaders.CloneAndAddValue(), System.Net.Http.Headers.HttpHeaders.CloneStringHeaderInfoValues(), System.Net.Http.Headers.HttpHeaders.CreateAndAddHeaderToStore(), System.item, System.list, and System.Net.Http.Headers.HeaderDescriptor.Parser.

Referenced by System.Net.Http.Headers.HttpHeaders.AddHeaders().