Ejemplo n.º 1
0
 internal static bool SListAppend(SafeCurlSListHandle slist, string headerValue)
 {
     bool gotRef = false;
     try
     {
         slist.DangerousAddRef(ref gotRef);
         IntPtr newHandle = SListAppend(slist.DangerousGetHandle(), headerValue);
         if (newHandle != IntPtr.Zero)
         {
             slist.SetHandle(newHandle);
             return true;
         }
         return false;
     }
     finally
     {
         if (gotRef)
             slist.DangerousRelease();
     }
 }
Ejemplo n.º 2
0
        internal static bool SListAppend(SafeCurlSListHandle slist, string headerValue)
        {
            bool gotRef = false;

            try
            {
                slist.DangerousAddRef(ref gotRef);
                IntPtr newHandle = SListAppend(slist.DangerousGetHandle(), headerValue);
                if (newHandle != IntPtr.Zero)
                {
                    slist.SetHandle(newHandle);
                    return(true);
                }
                return(false);
            }
            finally
            {
                if (gotRef)
                {
                    slist.DangerousRelease();
                }
            }
        }