Search Results for

    Show / Hide Table of Contents

    Class SchemaBuilderBase<T>

    A base class for the schema builders exposed by Realm.

    Inheritance
    Object
    SchemaBuilderBase<T>
    ObjectSchema.Builder
    RealmSchema.Builder
    Implements
    IEnumerable<T>
    IEnumerable
    Namespace: Realms.Schema
    Assembly: Realm.dll
    Syntax
    public abstract class SchemaBuilderBase<T> : IEnumerable<T>, IEnumerable
    Type Parameters
    Name Description
    T

    The type of the elements contained in the builder.

    Fields

    | Improve this Doc View Source

    _values

    Declaration
    protected readonly IDictionary<string, T> _values
    Field Value
    Type Description
    IDictionary<String, T>

    Properties

    | Improve this Doc View Source

    Count

    Gets the number of elements the builder contains.

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    Item[String]

    Gets or sets an element in the builder by name.

    Declaration
    public T this[string name] { get; set; }
    Parameters
    Type Name Description
    String name

    The name of the element.

    Property Value
    Type Description
    T

    The element with the specified name.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if name is null.

    KeyNotFoundException

    Thrown by the getter if the builder doesn't contain an element with the specified name.

    Methods

    | Improve this Doc View Source

    Add(T)

    Declaration
    protected void Add(T item)
    Parameters
    Type Name Description
    T item
    | Improve this Doc View Source

    Contains(T)

    Checks if the builder contains the provided element.

    Declaration
    public bool Contains(T item)
    Parameters
    Type Name Description
    T item

    The item to check for existence.

    Returns
    Type Description
    Boolean

    true if the builder contains the specified item; false otherwise.

    | Improve this Doc View Source

    Contains(String)

    Checks if the builder contains the provided element by name.

    Declaration
    public bool Contains(string name)
    Parameters
    Type Name Description
    String name

    The name of the element being searched for.

    Returns
    Type Description
    Boolean

    true if the builder contains the specified item; false otherwise.

    | Improve this Doc View Source

    GetKey(T)

    Declaration
    protected abstract string GetKey(T item)
    Parameters
    Type Name Description
    T item
    Returns
    Type Description
    String
    | Improve this Doc View Source

    Remove(T)

    Removes an element from the builder.

    Declaration
    public bool Remove(T item)
    Parameters
    Type Name Description
    T item

    The element to remove.

    Returns
    Type Description
    Boolean

    true if the element was found and removed; false otherwise.

    | Improve this Doc View Source

    Remove(String)

    Removes an element from the builder by name.

    Declaration
    public bool Remove(string name)
    Parameters
    Type Name Description
    String name

    The name of the element to remove.

    Returns
    Type Description
    Boolean

    true if the element was found and removed; false otherwise.

    Implements

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