.NET Client Documentation
5.1.1
Search Results for

    Show / Hide Table of Contents

    SubscribeAsync Method

    SubscribeAsync(Action<MapEventHandlers<TKey, TValue>>, Boolean, 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.

    Boolean 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, Boolean, 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.

    Boolean 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, Boolean, 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.

    Boolean 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, Boolean, 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.

    Boolean 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.

    In This Article
    Back to top Copyright © 2010-2022 Hazelcast, Inc. All rights reserved.
    Generated by DocFX.