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.
Inherited Members
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 SourceCount
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 SourceAddDefaultTypes(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. |
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 |
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown if a name is not supplied. |
GetEnumerator()
Declaration
public IEnumerator<ObjectSchema> GetEnumerator()
Returns
Type | Description |
---|---|
IEnumerator<ObjectSchema> |
Explicit Interface Implementations
| Improve this Doc View SourceIEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
IEnumerator |