Firebase.Database.TransactionResult

Instances of this class represent the desired outcome of a single Run of a transaction.

Summary

Pass a handler to DatabaseReference.RunTransaction, and in your handler, you can either:

Properties

IsSuccess
bool
Whether or not this result is a success.

Public static functions

Abort()
Aborts the transaction run with DatabaseReference.RunTransaction and returns an aborted TransactionResult which can be returned from RunTransaction.
Success(MutableData resultData)
Builds a successful result to be returned from the handler passed to DatabaseReference.RunTransaction.

Properties

IsSuccess

bool IsSuccess

Whether or not this result is a success.

Public static functions

Abort

TransactionResult Abort()

Aborts the transaction run with DatabaseReference.RunTransaction and returns an aborted TransactionResult which can be returned from RunTransaction.

Success

TransactionResult Success(
  MutableData resultData
)

Builds a successful result to be returned from the handler passed to DatabaseReference.RunTransaction.

Details
Parameters
resultData
The desired data to be stored at the location.
Returns
A TransactionResult indicating the new data to be stored at the location.