Search Results for

    Show / Hide Table of Contents

    Class ObjectSchema

    Public description of a class stored in a Realm, as a collection of managed Property objects. To construct a new instance, use the ObjectSchema.Builder API.

    Inheritance
    object
    ObjectSchema
    Implements
    IReadOnlyCollection<Property>
    IEnumerable<Property>
    IEnumerable
    Namespace: Realms.Schema
    Assembly: Realm.dll
    Syntax
    public class ObjectSchema : IReadOnlyCollection<Property>, IEnumerable<Property>, IEnumerable

    Properties

    | Edit this page View Source

    BaseType

    Gets a ObjectSchema.ObjectType indicating whether this ObjectSchema describes a top level object, an embedded object or an asymmetric object.

    Declaration
    public ObjectSchema.ObjectType BaseType { get; }
    Property Value
    Type Description
    ObjectSchema.ObjectType

    The type of ObjectSchema.

    | Edit this page View Source

    Count

    Gets the number of properties in the schema, which is the persistent properties from the original class.

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    int

    The number of persistent properties for the object.

    | Edit this page View Source

    Name

    Gets the name of the original class declaration from which the schema was built.

    Declaration
    public string Name { get; }
    Property Value
    Type Description
    string

    The name of the class.

    Methods

    | Edit this page View Source

    GetBuilder()

    Create a mutable ObjectSchema.Builder containing the properties in this schema.

    Declaration
    public ObjectSchema.Builder GetBuilder()
    Returns
    Type Description
    ObjectSchema.Builder

    A ObjectSchema.Builder instance that can be used to mutate the schema and eventually produce a new one by calling Build().

    | Edit this page View Source

    TryFindProperty(string, out Property)

    Looks for a Property by Name. Failure to find means it is not regarded as a property to persist in a Realm.

    Declaration
    public bool TryFindProperty(string name, out Property property)
    Parameters
    Type Name Description
    string name

    Name of the Property to match exactly.

    Property property

    Property returned only if found matching Name.

    Returns
    Type Description
    bool

    true, if a Property was found matching Name; false otherwise.

    Implements

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