Ditto 5.0.0
Loading...
Searching...
No Matches
DittoSDK.Store.DittoStoreObserver Class Reference

A store observer invokes an observation handler whenever results for its query change. More...

Inheritance diagram for DittoSDK.Store.DittoStoreObserver:
DittoSDK.Internal.Drop

Public Member Functions

void Cancel ()
 Cancels the observation. The handler that was passed in when registering this store observer will no longer be called. No-op if this store observer is already cancelled or the owning Ditto object goes out of scope.
override bool Equals (object obj)
override int GetHashCode ()
Public Member Functions inherited from DittoSDK.Internal.Drop
void Dispose ()
 Suppresses finalization and initiates custom disposal logic.

Static Public Member Functions

static bool operator== (DittoStoreObserver a, DittoStoreObserver b)
static bool operator!= (DittoStoreObserver a, DittoStoreObserver b)

Protected Member Functions

override unsafe void Dispose (bool disposing)
Protected Member Functions inherited from DittoSDK.Internal.Drop
void Dispose (bool disposing)
 Overload for types to dispose of resources, regardless of whether the type is being disposed or finalized. Note that finalization occurs on a dedicated thread.

Properties

Ditto Ditto [get]
 Gets the Ditto object this store observer is registered with.
string QueryString [get]
 Gets the query string of the store observer (as passed while registering it).
Dictionary< string, object > QueryArguments [get]
 Gets the query arguments of the store observer (as passed while registering it).
byte[] QueryArgumentsCborData [get]
 Gets the query arguments of the store observer, encoded as CBOR.
string QueryArgumentsJsonString [get]
 Gets the query arguments of the store observer, encoded as a JSON string.
bool IsCancelled [get]
 Gets a value indicating whether the store observer has been cancelled or not. Also, a store observer is considered cancelled if the owning Ditto object goes out of scope.
Properties inherited from DittoSDK.Internal.Drop
bool IsDisposed [get]

Detailed Description

A store observer invokes an observation handler whenever results for its query change.

Create a store observer by calling DittoStore.RegisterObserver. The store observer will remain active until the owning Ditto object goes out of scope or DittoStoreObserver.Cancel is called.

Property Documentation

◆ QueryArguments

Dictionary<string, object> DittoSDK.Store.DittoStoreObserver.QueryArguments
get

Gets the query arguments of the store observer (as passed while registering it).

The returned value is not guaranteed to be strictly equal to the value provided when making the call to DittoStore.RegisterObserver, as the arguments will have gone through a serialization roundtrip. This might affect equality checks, particularly for non-primitive values. If you want to have more control over how to deserialize the query arguments then use QueryArgumentsCborData or QueryArgumentsJsonString.

See also
QueryArgumentsCborData, QueryArgumentsJsonString

◆ QueryArgumentsCborData

byte [] DittoSDK.Store.DittoStoreObserver.QueryArgumentsCborData
get

Gets the query arguments of the store observer, encoded as CBOR.

See also
QueryArguments

◆ QueryArgumentsJsonString

string DittoSDK.Store.DittoStoreObserver.QueryArgumentsJsonString
get

Gets the query arguments of the store observer, encoded as a JSON string.

See also
QueryArguments