Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
PathList.cs
Go to the documentation of this file.
3
4namespace System.Net;
5
7[TypeForwardedFrom("System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
8public sealed class PathList
9{
10 [Serializable]
11 [TypeForwardedFrom("System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
12 private sealed class PathListComparer : IComparer
13 {
14 internal static readonly PathListComparer StaticInstance = new PathListComparer();
15
16 int IComparer.Compare(object ol, object or)
17 {
18 string text = CookieParser.CheckQuoted((string)ol);
19 string text2 = CookieParser.CheckQuoted((string)or);
20 int length = text.Length;
21 int length2 = text2.Length;
22 int num = Math.Min(length, length2);
23 for (int i = 0; i < num; i++)
24 {
25 if (text[i] != text2[i])
26 {
27 return text[i] - text2[i];
28 }
29 }
30 return length2 - length;
31 }
32 }
33
35
36 internal int Count => m_list.Count;
37
39
40 internal object? this[string s]
41 {
42 get
43 {
44 lock (SyncRoot)
45 {
46 return m_list[s];
47 }
48 }
49 set
50 {
51 lock (SyncRoot)
52 {
53 m_list[s] = value;
54 }
55 }
56 }
57
58 internal SortedList List => m_list;
59
60 internal object SyncRoot => m_list.SyncRoot;
61
62 internal int GetCookiesCount()
63 {
64 int num = 0;
65 lock (SyncRoot)
66 {
67 IList valueList = m_list.GetValueList();
68 int count = valueList.Count;
69 for (int i = 0; i < count; i++)
70 {
71 num += ((CookieCollection)valueList[i]).Count;
72 }
73 return num;
74 }
75 }
76
78 {
79 lock (SyncRoot)
80 {
81 return m_list.GetEnumerator();
82 }
83 }
84
85 internal void Remove(object key)
86 {
87 lock (SyncRoot)
88 {
90 }
91 }
92}
static SortedList Synchronized(SortedList list)
IEnumerator IEnumerable. GetEnumerator()
virtual void Remove(object key)
virtual ICollection Values
static byte Min(byte val1, byte val2)
Definition Math.cs:912
static readonly PathListComparer StaticInstance
Definition PathList.cs:14
IDictionaryEnumerator GetEnumerator()
Definition PathList.cs:77
ICollection Values
Definition PathList.cs:38
SortedList List
Definition PathList.cs:58
void Remove(object key)
Definition PathList.cs:85
readonly SortedList m_list
Definition PathList.cs:34
int Compare(object? x, object? y)
static string CheckQuoted(string value)