Inheritance: Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid
Example #1
0
 internal RealmHandle(RealmHandle root) : base(true)
 {
     if (root == null) // if we are a root object, we need a list for our children and Root is already null
     {
         _unbindList = GetUnbindList();
     }
     else
     {
         Root = root;
         root.LockAndUndbindList();
     }
 }
Example #2
0
 /// <summary>
 /// Called by children to this root, when they would like to 
 /// be unbound, but are (possibly) running in a finalizer thread 
 /// so it is (possibly) not safe to unbind then directly.
 /// </summary>
 /// <param name="handleToUnbind">The core handle that is not needed anymore and should be unbound.</param>
 private void RequestUnbind(RealmHandle handleToUnbind)
 {
     lock (_unbindListLock) // You can lock a lock several times inside the same thread. The top-level-lock is the one that counts
     {
         // first let's see if we should go to the list or not
         if (_noMoreUserThread)
         {
             UnbindLockedList();
             handleToUnbind.Unbind();
         }
         else
         {
             _unbindList.Add(handleToUnbind); // resurrects handleToUnbind - but it is never a root object bc RequestUnbind is always called above with root.
         }
     }
 }
Example #3
0
 public QueryHandle(RealmHandle root) : base(root)
 {
 }
Example #4
0
 public ResultsHandle(RealmHandle root, IntPtr handle) : base(root, handle)
 {
     SnapshotCore = (out NativeException ex) => NativeMethods.snapshot(this, out ex);
 }
Example #5
0
 private TableHandle(RealmHandle root) : base(root)
 {
 }
Example #6
0
 public static extern void remove(ObjectHandle handle, RealmHandle realmHandle, out NativeException ex);
Example #7
0
 protected CollectionHandleBase(RealmHandle root, IntPtr handle) : base(root, handle)
 {
 }
Example #8
0
 public ResultsHandle(RealmHandle root, IntPtr handle) : base(root, handle)
 {
 }
Example #9
0
 public QueryHandle(RealmHandle root, IntPtr handle) : base(root, handle)
 {
 }
Example #10
0
 public SortDescriptorHandle(RealmHandle root, IntPtr handle) : base(root, handle)
 {
 }
Example #11
0
 private TableHandle(RealmHandle root) : base(root)
 {
 }
Example #12
0
        // if root is null the this tablehandle is responsible for cleaning up the tableView and its children
        // if root is something else, it is the this tablehandles root, and that root should also manage the tableview and its children
        // note that IgnoreUnbind is set to false, the tableview should be unbound

        /*
         *  private TableViewHandle RootedTableViewHandle()
         *  {
         *      return (Root == null) ?
         *          new TableViewHandle(this):
         *          new TableViewHandle(Root);
         *  }
         */

        // call with a parent, will set the correct root (parent if parent.root=null, or parent.root otherwise)
        // if You want a RootedTableHandle with is self-rooted, call with no parameter
        internal static TableHandle RootedTableHandle(RealmHandle parent)
        {
            return(new TableHandle(parent.Root ?? parent));
        }
 protected CollectionHandleBase(RealmHandle root) : base(root)
 {
 }
Example #14
0
 public TableHandle(RealmHandle root, IntPtr handle) : base(root, handle)
 {
 }
 protected CollectionHandleBase(RealmHandle root) : base(root)
 {
 }
Example #16
0
 public DictionaryHandle(RealmHandle root, IntPtr handle) : base(root, handle)
 {
 }
Example #17
0
 public ListHandle(RealmHandle root) : base(root)
 {
 }
Example #18
0
 // call with a parent, will set the correct root (parent if parent.root=null, or parent.root otherwise)
 // if You want a RootedTableHandle with is self-rooted, call with no parameter
 internal static TableHandle RootedTableHandle(RealmHandle parent)
 {
     return new TableHandle(parent.Root ?? parent);
 }
Example #19
0
 public QueryHandle(RealmHandle root) : base(root)
 {
 }
Example #20
0
 public ObjectHandle(RealmHandle root, IntPtr handle) : base(root, handle)
 {
 }
Example #21
0
 public ListHandle(RealmHandle root, IntPtr handle) : base(root, handle)
 {
 }
Example #22
0
 internal ListHandle(RealmHandle root) : base(root)
 {
 }
 protected NotifiableObjectHandleBase(RealmHandle root, IntPtr handle) : base(root, handle)
 {
 }