Ditto 4.8.0
Loading...
Searching...
No Matches
DittoSDK.DittoMutableCounter Class Reference

Represents a mutable CRDT counter that can be incremented by a specific amount while updating a document. More...

Inheritance diagram for DittoSDK.DittoMutableCounter:
DittoSDK.DittoCounter

Public Member Functions

unsafe void Increment (double amount)
 Increments the counter by amount, which can be any valid 64-bit float.
 
- Public Member Functions inherited from DittoSDK.DittoCounter
 DittoCounter (double value)
 

Additional Inherited Members

- Properties inherited from DittoSDK.DittoCounter
double Value [get, set]
 Gets the value of the counter.
 

Detailed Description

Represents a mutable CRDT counter that can be incremented by a specific amount while updating a document.

This class can't be instantiated directly, it's returned automatically for any counter property within an update block.

See also the Counter property of DittoMutableDocumentPath.

Member Function Documentation

◆ Increment()

unsafe void DittoSDK.DittoMutableCounter.Increment ( double amount)
inline

Increments the counter by amount, which can be any valid 64-bit float.

Only valid within a call to Update on either a DittoPendingCursorOperation or a DittoPendingIdSpecificOperation, otherwise an exception is thrown.

Parameters
amountThe amount to increment the counter by.