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

◆ MergeUpdateCollections()

void System.Net.CookieContainer.MergeUpdateCollections ( ref CookieCollection destination,
CookieCollection source,
int port,
bool isSecure,
bool isPlainOnly )
inlineprivate

Definition at line 726 of file CookieContainer.cs.

727 {
728 lock (source)
729 {
730 for (int i = 0; i < source.Count; i++)
731 {
732 bool flag = false;
734 if (cookie.Expired)
735 {
736 source.RemoveAt(i);
737 m_count--;
738 i--;
739 continue;
740 }
741 if (!isPlainOnly || cookie.Variant == CookieVariant.Plain)
742 {
743 if (cookie.PortList != null)
744 {
745 int[] portList = cookie.PortList;
746 foreach (int num in portList)
747 {
748 if (num == port)
749 {
750 flag = true;
751 break;
752 }
753 }
754 }
755 else
756 {
757 flag = true;
758 }
759 }
760 if (cookie.Secure && !isSecure)
761 {
762 flag = false;
763 }
764 if (flag)
765 {
766 if (destination == null)
767 {
768 destination = new CookieCollection();
769 }
770 destination.InternalAdd(cookie, isStrict: false);
771 }
772 }
773 }
774 }

References System.destination, System.Net.CookieContainer.m_count, and System.source.

Referenced by System.Net.CookieContainer.BuildCookieCollectionFromDomainMatches().