Inheritance: Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid
Ejemplo n.º 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();
     }
 }
Ejemplo n.º 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.
         }
     }
 }
Ejemplo n.º 3
0
 public QueryHandle(RealmHandle root) : base(root)
 {
 }
Ejemplo n.º 4
0
 public ResultsHandle(RealmHandle root, IntPtr handle) : base(root, handle)
 {
     SnapshotCore = (out NativeException ex) => NativeMethods.snapshot(this, out ex);
 }
Ejemplo n.º 5
0
 private TableHandle(RealmHandle root) : base(root)
 {
 }
Ejemplo n.º 6
0
 public static extern void remove(ObjectHandle handle, RealmHandle realmHandle, out NativeException ex);
Ejemplo n.º 7
0
 protected CollectionHandleBase(RealmHandle root, IntPtr handle) : base(root, handle)
 {
 }
Ejemplo n.º 8
0
 public ResultsHandle(RealmHandle root, IntPtr handle) : base(root, handle)
 {
 }
Ejemplo n.º 9
0
 public QueryHandle(RealmHandle root, IntPtr handle) : base(root, handle)
 {
 }
Ejemplo n.º 10
0
 public SortDescriptorHandle(RealmHandle root, IntPtr handle) : base(root, handle)
 {
 }
Ejemplo n.º 11
0
 private TableHandle(RealmHandle root) : base(root)
 {
 }
Ejemplo n.º 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));
        }
Ejemplo n.º 13
0
 protected CollectionHandleBase(RealmHandle root) : base(root)
 {
 }
Ejemplo n.º 14
0
 public TableHandle(RealmHandle root, IntPtr handle) : base(root, handle)
 {
 }
 protected CollectionHandleBase(RealmHandle root) : base(root)
 {
 }
Ejemplo n.º 16
0
 public DictionaryHandle(RealmHandle root, IntPtr handle) : base(root, handle)
 {
 }
Ejemplo n.º 17
0
 public ListHandle(RealmHandle root) : base(root)
 {
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 19
0
 public QueryHandle(RealmHandle root) : base(root)
 {
 }
Ejemplo n.º 20
0
 public ObjectHandle(RealmHandle root, IntPtr handle) : base(root, handle)
 {
 }
Ejemplo n.º 21
0
 public ListHandle(RealmHandle root, IntPtr handle) : base(root, handle)
 {
 }
Ejemplo n.º 22
0
 internal ListHandle(RealmHandle root) : base(root)
 {
 }
 protected NotifiableObjectHandleBase(RealmHandle root, IntPtr handle) : base(root, handle)
 {
 }