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

◆ InternalAdd()

int System.Net.CookieCollection.InternalAdd ( Cookie cookie,
bool isStrict )
inlinepackage

Definition at line 148 of file CookieCollection.cs.

149 {
150 int result = 1;
151 if (isStrict)
152 {
153 int num = 0;
154 int count = m_list.Count;
155 for (int i = 0; i < count; i++)
156 {
158 if (CookieComparer.Compare(cookie, cookie2) == 0)
159 {
160 result = 0;
161 if (cookie2.Variant <= cookie.Variant)
162 {
163 m_list[num] = cookie;
164 }
165 break;
166 }
167 num++;
168 }
169 if (num == m_list.Count)
170 {
172 }
173 }
174 else
175 {
177 }
178 if (cookie.Version != 1)
179 {
181 }
182 return result;
183 }
virtual int Add(object? value)

References System.Collections.ArrayList.Add(), System.Net.CookieComparer.Compare(), System.Net.Cookie, System.count, System.Collections.ArrayList.Count, System.Runtime.Serialization.Dictionary, System.Net.CookieCollection.m_has_other_versions, and System.Net.CookieCollection.m_list.

Referenced by System.Net.HttpListenerResponse.SetCookie().