Class ObjectSchema
Public description of a class stored in a Realm, as a collection of managed Property objects. To construct a new instance, use the ObjectSchema.Builder API.
Namespace: Realms.Schema
Assembly: Realm.dll
Syntax
public class ObjectSchema : IReadOnlyCollection<Property>, IEnumerable<Property>, IEnumerable
Properties
| Improve this Doc View SourceCount
Gets the number of properties in the schema, which is the persistent properties from the original class.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
Int32 | The number of persistent properties for the object. |
IsEmbedded
Gets a value indicating whether this ObjectSchema describes an embedded object.
Declaration
public bool IsEmbedded { get; }
Property Value
Type | Description |
---|---|
Boolean |
|
Name
Gets the name of the original class declaration from which the schema was built.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
String | The name of the class. |
Methods
| Improve this Doc View SourceGetBuilder()
Create a mutable ObjectSchema.Builder containing the properties in this schema.
Declaration
public ObjectSchema.Builder GetBuilder()
Returns
Type | Description |
---|---|
ObjectSchema.Builder | A ObjectSchema.Builder instance that can be used to mutate the schema and eventually produce a new one by calling Build(). |
TryFindProperty(String, out Property)
Looks for a Property by Name. Failure to find means it is not regarded as a property to persist in a Realm.
Declaration
public bool TryFindProperty(string name, out Property property)
Parameters
Type | Name | Description |
---|---|---|
String | name | |
Property | property | Property returned only if found matching Name. |
Returns
Type | Description |
---|---|
Boolean |
|