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

◆ TryGetHeaderDescriptor()

bool System.Net.Http.Headers.HttpHeaders.TryGetHeaderDescriptor ( string name,
out HeaderDescriptor descriptor )
inlineprivateinherited

Definition at line 869 of file HttpHeaders.cs.

870 {
871 if (string.IsNullOrEmpty(name))
872 {
873 descriptor = default(HeaderDescriptor);
874 return false;
875 }
876 if (HeaderDescriptor.TryGet(name, out descriptor))
877 {
878 if ((descriptor.HeaderType & _allowedHeaderTypes) != 0)
879 {
880 return true;
881 }
882 if ((descriptor.HeaderType & _treatAsCustomHeaderTypes) != 0)
883 {
884 descriptor = descriptor.AsCustomHeader();
885 return true;
886 }
887 }
888 return false;
889 }
readonly HttpHeaderType _allowedHeaderTypes
readonly HttpHeaderType _treatAsCustomHeaderTypes

References System.Net.Http.Headers.HttpHeaders._allowedHeaderTypes, System.Net.Http.Headers.HttpHeaders._treatAsCustomHeaderTypes, and System.Net.Http.Headers.HeaderDescriptor.TryGet().

Referenced by System.Net.Http.Headers.HttpHeaders.TryAddWithoutValidation(), System.Net.Http.Headers.HttpHeaders.TryAddWithoutValidation(), and System.Net.Http.Headers.HttpHeaders.TryGetValues().