C# Class Realms.Transaction

Provides a scope to safely read and write to a Realm. Must use explicitly via Realm.BeginWrite.
All access to a Realm occurs within a Transaction. Read transactions are created implicitly.
Inheritance: IDisposable
Mostra file Open project: realm/realm-dotnet Class Usage Examples

Public Methods

Method Description
Commit ( ) : void

Use to save the changes to the realm. If Transaction is declared in a using block, must be used before the end of that block.

Dispose ( ) : void

Will automatically Rollback the transaction on existing scope, if not explicitly Committed.

Rollback ( ) : void

Use explicitly to undo the changes in a Transaction, otherwise it is automatically invoked by exiting the block.

Private Methods

Method Description
Transaction ( ) : System
Transaction ( Realm realm ) : System

Method Details

Commit() public method

Use to save the changes to the realm. If Transaction is declared in a using block, must be used before the end of that block.
public Commit ( ) : void
return void

Dispose() public method

Will automatically Rollback the transaction on existing scope, if not explicitly Committed.
public Dispose ( ) : void
return void

Rollback() public method

Use explicitly to undo the changes in a Transaction, otherwise it is automatically invoked by exiting the block.
public Rollback ( ) : void
return void