Class SchemaBuilderBase<T>
A base class for the schema builders exposed by Realm.
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 SourceCount
Gets the number of elements the builder contains.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
Int32 |
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 |
KeyNotFoundException | Thrown by the getter if the builder doesn't contain an element with the specified |
Methods
| Improve this Doc View SourceAdd(T)
Declaration
protected void Add(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item |
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 |
|
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 |
|
GetKey(T)
Declaration
protected abstract string GetKey(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item |
Returns
Type | Description |
---|---|
String |
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 |
|
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 |
|