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

◆ GetValueCount()

static int System.Net.Http.Headers.HttpHeaders.GetValueCount ( HeaderStoreItemInfo info)
inlinestaticprivateinherited

Definition at line 975 of file HttpHeaders.cs.

976 {
977 int num = Count<string>(info.RawValue);
978 num += Count<string>(info.InvalidValue);
979 return num + Count<object>(info.ParsedValue);
980 static int Count<T>(object valueStore)
981 {
982 if (valueStore != null)
983 {
984 if (!(valueStore is List<T> list))
985 {
986 return 1;
987 }
988 return list.Count;
989 }
990 return 0;
991 }
992 }

References System.Collections.Generic.Dictionary< TKey, TValue >.Count, System.info, and System.list.

Referenced by System.Net.Http.Headers.HttpHeaders.GetStoreValuesAsStringOrStringArray(), and System.Net.Http.Headers.HttpHeaders.GetStoreValuesIntoStringArray().