Beispiel #1
0
        /// <summary>
        /// Use explicitly to undo the changes in a transaction, otherwise it is automatically invoked by exiting the block.
        /// </summary>
        public void Rollback()
        {
            if (!_isOpen)
            {
                throw new Exception("Transaction was already closed. Cannot roll back");
            }

            NativeSharedRealm.cancel_transaction(_sharedRealmHandle);
            _isOpen = false;
        }