Realm Xamarin  v0.80.0
Realm for Xamarin
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Properties | List of all members
ObjectSchema Class Reference

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

Inheritance diagram for ObjectSchema:
Inheritance graph
[legend]
Collaboration diagram for ObjectSchema:
Collaboration graph
[legend]

Classes

class  Builder
 Helper class used to construct an ObjectSchema. More...
 

Public Member Functions

IEnumerator< PropertyGetEnumerator ()
 Property enumerator factory for an iterator to be called explicitly or used in a foreach loop. More...
 
bool TryFindProperty (string name, out Property property)
 Looks for a Property by Name. Failure to find means it is not regarded as a property to persist in a Realm. More...
 

Static Public Member Functions

static ObjectSchema FromType (Type type)
 Creates a schema describing a RealmObject subclass in terms of its persisted members. More...
 

Public Attributes

int Count => _properties.Count
 Gets the number of properties in the schema, which is the persistent properties from the original class. More...
 

Properties

string Name [get]
 Gets the name of the original class declaration from which the schema was built. More...
 

Detailed Description

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

Member Function Documentation

§ FromType()

static ObjectSchema FromType ( Type  type)
static

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

Exceptions
ArgumentExceptionThrown if no class Type is provided or if it doesn't descend directly from RealmObject.
Returns
An ObjectSchema describing the specified Type.
Parameters
typeType of a RealmObject descendant for which you want a schema.

Referenced by RealmSchema.GetEnumerator().

§ GetEnumerator()

IEnumerator<Property> GetEnumerator ( )

Property enumerator factory for an iterator to be called explicitly or used in a foreach loop.

Returns
An enumerator over the list of Property instances described in the schema.

§ TryFindProperty()

bool TryFindProperty ( string  name,
out Property  property 
)

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

Returns
true, if a property was found matching Name, false otherwise.
Parameters
nameName of the Property to match exactly.
propertyProperty returned only if found matching Name.

Member Data Documentation

§ Count

int Count => _properties.Count

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

Property Documentation

§ Name

string Name
get

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