Realm Xamarin  v0.81.0
Realm for Xamarin
Classes | Public Member Functions | Public Attributes | List of all members
Realms.RealmSchema Class Reference

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. More...

Inheritance diagram for Realms.RealmSchema:
Inheritance graph
[legend]
Collaboration diagram for Realms.RealmSchema:
Collaboration graph
[legend]

Classes

class  Builder
 Helper class used to construct a RealmSchema. More...
 

Public Member Functions

ObjectSchema Find (string name)
 Finds the definition of a class in this schema. More...
 
IEnumerator< ObjectSchemaGetEnumerator ()
 Standard method from interface IEnumerable allows the RealmSchema to be used in a foreach or ToList(). More...
 

Public Attributes

int Count => _objects.Count
 Gets the number of known classes in the schema. More...
 

Detailed Description

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.

By default this will be all the RealmObjects in all your assemblies unless you restrict with RealmConfiguration.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.

Member Function Documentation

§ Find()

ObjectSchema Realms.RealmSchema.Find ( string  name)

Finds the definition of a class in this schema.

Parameters
nameA valid class name which may be in this schema.
Exceptions
ArgumentExceptionThrown if a name is not supplied.
Returns
An object or null to indicate not found.

§ GetEnumerator()

IEnumerator<ObjectSchema> Realms.RealmSchema.GetEnumerator ( )

Standard method from interface IEnumerable allows the RealmSchema to be used in a foreach or ToList().

Returns
An IEnumerator which will iterate through ObjectSchema declarations in this RealmSchema.

References Realms.Schema.ObjectSchema.Builder.Build(), and Realms.Schema.ObjectSchema.FromType().

Member Data Documentation

§ Count

int Realms.RealmSchema.Count => _objects.Count

Gets the number of known classes in the schema.