Esempio n. 1
0
        internal LinkListHandle TableLinkList(IntPtr columnIndex, IntPtr rowIndex)
        {
            var listHandle = RootedLinkListHandle();

            //At this point sh is invalid due to its handle being uninitialized, but the root is set correctly
            //a finalize at this point will not leak anything and the handle will not do anything

            //now, set the TableView handle...
            RuntimeHelpers.PrepareConstrainedRegions();//the following finally will run with no out-of-band exceptions
            try
            { }
            finally
            {
                listHandle.SetHandle(NativeTable.GetLinklist(this, columnIndex, rowIndex));
            }//at this point we have atomically acquired a handle and also set the root correctly so it can be unbound correctly
            return(listHandle);
        }