Show / Hide Table of Contents

    Class RealmSchema

    Describes the complete set of classes which may be stored in a Realm, either from assembly declarations or, dynamically, by evaluating a Realm from disk.

    Inheritance
    Object
    RealmSchema
    Implements
    IReadOnlyCollection<ObjectSchema>
    IEnumerable<ObjectSchema>
    IEnumerable
    Namespace: Realms.Schema
    Assembly: Realm.dll
    Syntax
    public class RealmSchema : IReadOnlyCollection<ObjectSchema>, IEnumerable<ObjectSchema>, IEnumerable
    Remarks

    By default this will be all the RealmObjects in all your assemblies unless you restrict with ObjectClasses. Just because a given class may be stored in a Realm doesn't imply much overhead. There will be a small amount of metadata but objects only start to take up space once written.

    Properties

    | Improve this Doc View Source

    Count

    Gets the number of known classes in the schema.

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

    The number of known classes.

    Methods

    | Improve this Doc View Source

    AddDefaultTypes(IEnumerable<Type>)

    Adds a collection of types to the default schema.

    Declaration
    public static void AddDefaultTypes(IEnumerable<Type> types)
    Parameters
    Type Name Description
    IEnumerable<Type> types

    Types to be added to the default schema.

    Exceptions
    Type Condition
    NotSupportedException

    Thrown if the schema has already materialized.

    | Improve this Doc View Source

    Find(String)

    Finds the definition of a class in this schema.

    Declaration
    public ObjectSchema Find(string name)
    Parameters
    Type Name Description
    String name

    A valid class name which may be in this schema.

    Returns
    Type Description
    ObjectSchema

    An ObjectSchema or null to indicate not found.

    Exceptions
    Type Condition
    ArgumentException

    Thrown if a name is not supplied.

    | Improve this Doc View Source

    GetEnumerator()

    Returns an enumerator that iterates through the collection.

    Declaration
    public IEnumerator<ObjectSchema> GetEnumerator()
    Returns
    Type Description
    IEnumerator<ObjectSchema>

    An enumerator that can be used to iterate through the collection.

    Explicit Interface Implementations

    | Improve this Doc View Source

    IEnumerable.GetEnumerator()

    Returns an enumerator that iterates through the collection.

    Declaration
    IEnumerator IEnumerable.GetEnumerator()
    Returns
    Type Description
    IEnumerator

    An enumerator that can be used to iterate through the collection.

    Implements

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