Search Results for

    Show / Hide Table of Contents

    Class KeyPathsCollection

    Represents a collection of KeyPath that can be used when subscribing to notifications with SubscribeForNotifications(NotificationCallbackDelegate<T>, KeyPathsCollection?).

    A KeyPathsCollection can be obtained by:

    • building it explicitly by using the method Of(params KeyPath[]);
    • building it implicitly with the conversion from a List<T> or array of KeyPath or strings;
    • getting one of the static values Full and Shallow for full and shallow notifications respectively.
    Inheritance
    object
    KeyPathsCollection
    Implements
    IEnumerable<KeyPath>
    IEnumerable
    Namespace: Realms
    Assembly: Realm.dll
    Syntax
    public class KeyPathsCollection : IEnumerable<KeyPath>, IEnumerable

    Properties

    | Edit this page View Source

    Full

    Gets a KeyPathsCollection value for full notifications, for which changes to all top-level properties and 4 nested levels will raise a notification. This is the default KeyPathsCollection value.

    Declaration
    public static KeyPathsCollection Full { get; }
    Property Value
    Type Description
    KeyPathsCollection
    | Edit this page View Source

    Shallow

    Gets a KeyPathsCollection value for shallow notifications, that will raise notifications only for changes to the collection itself (for example when an element is added or removed), but not for changes to any of the properties of the elements of the collection.

    Declaration
    public static KeyPathsCollection Shallow { get; }
    Property Value
    Type Description
    KeyPathsCollection

    Methods

    | Edit this page View Source

    Of(params KeyPath[])

    Builds a KeyPathsCollection from an array of KeyPath.

    Declaration
    public static KeyPathsCollection Of(params KeyPath[] paths)
    Parameters
    Type Name Description
    KeyPath[] paths

    The array of KeyPath to use for the KeyPathsCollection.

    Returns
    Type Description
    KeyPathsCollection

    The KeyPathsCollection built from the input array of KeyPath.

    | Edit this page View Source

    Of<T>(params Expression<Func<T, object?>>[])

    Builds a KeyPathsCollection from an array of Expression. Each of the expressions must represent the path to a realm object property, eventually chained.

    Declaration
    public static KeyPathsCollection Of<T>(params Expression<Func<T, object?>>[] expressions) where T : IRealmObject
    Parameters
    Type Name Description
    Expression<Func<T, object>>[] expressions

    The array of Expression to use for the KeyPathsCollection.

    Returns
    Type Description
    KeyPathsCollection

    The KeyPathsCollection built from the input array of Expression.

    Type Parameters
    Name Description
    T

    The realm object. type.

    Operators

    | Edit this page View Source

    implicit operator KeyPathsCollection(KeyPath[])

    Declaration
    public static implicit operator KeyPathsCollection(KeyPath[] paths)
    Parameters
    Type Name Description
    KeyPath[] paths
    Returns
    Type Description
    KeyPathsCollection
    | Edit this page View Source

    implicit operator KeyPathsCollection(List<KeyPath>)

    Declaration
    public static implicit operator KeyPathsCollection(List<KeyPath> paths)
    Parameters
    Type Name Description
    List<KeyPath> paths
    Returns
    Type Description
    KeyPathsCollection
    | Edit this page View Source

    implicit operator KeyPathsCollection(List<string>)

    Declaration
    public static implicit operator KeyPathsCollection(List<string> paths)
    Parameters
    Type Name Description
    List<string> paths
    Returns
    Type Description
    KeyPathsCollection
    | Edit this page View Source

    implicit operator KeyPathsCollection(string[])

    Declaration
    public static implicit operator KeyPathsCollection(string[] paths)
    Parameters
    Type Name Description
    string[] paths
    Returns
    Type Description
    KeyPathsCollection

    Implements

    IEnumerable<T>
    IEnumerable
    • Edit this page
    • View Source
    In this article
    Back to top Copyright © 2020-2024 Realm
    Generated by DocFX