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