Exemplo n.º 1
0
        internal static IntPtr AddToCleanupList(ref CleanupWorkListElement?pCleanupWorkList, SafeHandle handle)
        {
            SafeHandleCleanupWorkListElement element = new SafeHandleCleanupWorkListElement(handle);

            CleanupWorkListElement.AddToCleanupList(ref pCleanupWorkList, element);
            return(element.AddRef());
        }
 internal static IntPtr AddToCleanupList(ref CleanupWorkList pCleanupWorkList, SafeHandle handle)
 {
     if (pCleanupWorkList == null)
     {
         pCleanupWorkList = new CleanupWorkList();
     }
     CleanupWorkListElement elem = new CleanupWorkListElement(handle);
     pCleanupWorkList.Add(elem);
     return SafeHandleAddRef(handle, ref elem.m_owned);
 }
        internal static IntPtr AddToCleanupList(ref CleanupWorkList pCleanupWorkList, SafeHandle handle)
        {
            if (pCleanupWorkList == null)
            {
                pCleanupWorkList = new CleanupWorkList();
            }
            CleanupWorkListElement elem = new CleanupWorkListElement(handle);

            pCleanupWorkList.Add(elem);
            return(SafeHandleAddRef(handle, ref elem.m_owned));
        }
        internal static IntPtr AddToCleanupList(ref CleanupWorkList pCleanupWorkList, SafeHandle handle)
        {
            if (pCleanupWorkList == null)
            {
                pCleanupWorkList = new CleanupWorkList();
            }
            CleanupWorkListElement cleanupWorkListElement = new CleanupWorkListElement(handle);

            pCleanupWorkList.Add(cleanupWorkListElement);
            return(StubHelpers.SafeHandleAddRef(handle, ref cleanupWorkListElement.m_owned));
        }
Exemplo n.º 5
0
 public static void AddToCleanupList(ref CleanupWorkListElement?list, CleanupWorkListElement newElement)
 {
     if (list == null)
     {
         list = newElement;
     }
     else
     {
         newElement.m_Next = list;
         list = newElement;
     }
 }
Exemplo n.º 6
0
 // Token: 0x0600420F RID: 16911 RVA: 0x000F5934 File Offset: 0x000F3B34
 public void Add(CleanupWorkListElement elem)
 {
     this.m_list.Add(elem);
 }
Exemplo n.º 7
0
        internal static void KeepAliveViaCleanupList(ref CleanupWorkListElement?pCleanupWorkList, object obj)
        {
            KeepAliveCleanupWorkListElement element = new KeepAliveCleanupWorkListElement(obj);

            CleanupWorkListElement.AddToCleanupList(ref pCleanupWorkList, element);
        }
Exemplo n.º 8
0
        static internal IntPtr AddToCleanupList(ref CleanupWorkList pCleanupWorkList, SafeHandle handle) 
        {
            if (pCleanupWorkList == null) 
                pCleanupWorkList = new CleanupWorkList();

            CleanupWorkListElement element = new CleanupWorkListElement(handle);
            pCleanupWorkList.Add(element); 

            // element.m_owned will be true iff the AddRef succeeded 
            return SafeHandleAddRef(handle, ref element.m_owned); 
        }
Exemplo n.º 9
0
 public void Add(CleanupWorkListElement elem)
 { 
     BCLDebug.Assert(elem.m_owned == false, "m_owned is supposed to be false and set later by DangerousAddRef");
     m_list.Add(elem);
 }