public void Rollback() { if (!_isOpen) { throw new Exception("Transaction was already closed. Cannot roll back"); } _realm.SharedRealmHandle.CancelTransaction(); _isOpen = false; }