internal CookieWrapper AddManagedCookie(string aCookie, IntPtr aCString) { CookieWrapper cookie = new CookieWrapper(aCookie, aCString); lock (this) { iCookies.Add(cookie); } return(cookie); }
/// <summary> /// Remove a reference to the network adapter. /// </summary> /// <remarks>Removing the final reference causes the network adapter to be deleted.</remarks> public void RemoveRef(string aCookie) { CookieWrapper cookie = null; lock (this) { for (int i = 0; i < iCookies.Count; i++) { if (iCookies[i].AsString == aCookie) { cookie = iCookies[i]; iCookies.RemoveAt(i); break; } } } if (cookie == null) { throw new ArgumentException(); } OhNetNetworkAdapterRemoveRef(iHandle, cookie.AsCString); cookie.Dispose(); }
internal CookieWrapper AddManagedCookie(string aCookie, IntPtr aCString) { CookieWrapper cookie = new CookieWrapper(aCookie, aCString); lock (this) { iCookies.Add(cookie); } return cookie; }
public ExampleController() { _cookies = new CookieWrapper(); }