SubscribeAsync Method
SubscribeAsync(Action<MapEventHandlers<TKey, TValue>>, bool, object)
Subscribes to events.
Declaration
Task<Guid> SubscribeAsync(Action<MapEventHandlers<TKey, TValue>> events, bool includeValues = true, object state = null)
Parameters
Action<MapEventHandlers<TKey, TValue>> | events | An event handlers collection builder. |
bool | includeValues | Whether to include values in event arguments. |
object | state | A state object. |
Returns
Task<Guid> | The unique identifier of the subscription. |
SubscribeAsync(Action<MapEventHandlers<TKey, TValue>>, TKey, bool, object)
Subscribes to events.
Declaration
Task<Guid> SubscribeAsync(Action<MapEventHandlers<TKey, TValue>> events, TKey key, bool includeValues = true, object state = null)
Parameters
Action<MapEventHandlers<TKey, TValue>> | events | An event handlers collection builder. |
TKey | key | A key to filter events. |
bool | includeValues | Whether to include values in event arguments. |
object | state | A state object. |
Returns
Task<Guid> | The unique identifier of the subscription. |
SubscribeAsync(Action<MapEventHandlers<TKey, TValue>>, IPredicate, bool, object)
Subscribes to events.
Declaration
Task<Guid> SubscribeAsync(Action<MapEventHandlers<TKey, TValue>> events, IPredicate predicate, bool includeValues = true, object state = null)
Parameters
Action<MapEventHandlers<TKey, TValue>> | events | An event handlers collection builder. |
IPredicate | predicate | A predicate to filter events. |
bool | includeValues | Whether to include values in event arguments. |
object | state | A state object. |
Returns
Task<Guid> | The unique identifier of the subscription. |
Remarks
Note that some methods such as DeleteAsync(TKey) may break the events contract in some situations, such as when the predicate refers to the entry value. Refer to the documentation for these methods for more details.
SubscribeAsync(Action<MapEventHandlers<TKey, TValue>>, TKey, IPredicate, bool, object)
Subscribes to events.
Declaration
Task<Guid> SubscribeAsync(Action<MapEventHandlers<TKey, TValue>> events, TKey key, IPredicate predicate, bool includeValues = true, object state = null)
Parameters
Action<MapEventHandlers<TKey, TValue>> | events | An event handlers collection builder. |
TKey | key | A key to filter events. |
IPredicate | predicate | A predicate to filter events. |
bool | includeValues | Whether to include values in event arguments. |
object | state | A state object. |
Returns
Task<Guid> | The unique identifier of the subscription. |
Remarks
Note that some methods such as DeleteAsync(TKey) may break the events contract in some situations, such as when the predicate refers to the entry value. Refer to the documentation for these methods for more details.