Show / Hide Table of Contents

    Class ObjectSchema

    Public description of a class stored in a Realm, as a collection of managed Property objects.

    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

    | Improve this Doc 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
    Int32

    The number of persistent properties for the object.

    | Improve this Doc 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

    | Improve this Doc View Source

    FromType(TypeInfo)

    Creates a schema describing a RealmObject subclass in terms of its persisted members.

    Declaration
    public static ObjectSchema FromType(TypeInfo type)
    Parameters
    Type Name Description
    TypeInfo type

    Type of a RealmObject descendant for which you want a schema.

    Returns
    Type Description
    ObjectSchema

    An ObjectSchema describing the specified Type.

    Exceptions
    Type Condition
    ArgumentException

    Thrown if no class Type is provided or if it doesn't descend directly from RealmObject.

    | Improve this Doc View Source

    GetEnumerator()

    Declaration
    public IEnumerator<Property> GetEnumerator()
    Returns
    Type Description
    IEnumerator<Property>
    | Improve this Doc 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
    Boolean

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

    Explicit Interface Implementations

    | Improve this Doc View Source

    IEnumerable.GetEnumerator()

    Declaration
    IEnumerator IEnumerable.GetEnumerator()
    Returns
    Type Description
    IEnumerator

    Implements

    System.Collections.Generic.IReadOnlyCollection<T>
    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable
    • Improve this Doc
    • View Source
    Back to top Copyright © 2019 Realm
    Generated by DocFX