Class MutableArrayObject
A class representing an editable collection of objects
Implements
Inherited Members
Namespace: Couchbase.Lite
Assembly: Couchbase.Lite.dll
Syntax
public sealed class MutableArrayObject : ArrayObject, IJSON, IMutableArray, IArray, IArrayFragment, IEnumerable<object>, IEnumerable, IMutableArrayFragment
Constructors
| Improve this Doc View SourceMutableArrayObject()
Default Constructor
Declaration
public MutableArrayObject()
MutableArrayObject(IList)
Creates an array with the given data
Declaration
public MutableArrayObject(IList array)
Parameters
| Type | Name | Description |
|---|---|---|
| IList | array | The data to populate the array with |
MutableArrayObject(string)
Creates an array with the given json string
Declaration
public MutableArrayObject(string json)
Parameters
| Type | Name | Description |
|---|---|---|
| string | json |
Properties
| Improve this Doc View Sourcethis[int]
Gets a fragment style entry from the array by index
Declaration
public IMutableFragment this[int index] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The index to retrieve |
Property Value
| Type | Description |
|---|---|
| IMutableFragment | The fragment of the object at the index |
Methods
| Improve this Doc View SourceAddArray(ArrayObject)
Adds an entry to this collection
Declaration
public IMutableArray AddArray(ArrayObject value)
Parameters
| Type | Name | Description |
|---|---|---|
| ArrayObject | value | The value to add |
Returns
| Type | Description |
|---|---|
| IMutableArray | The array for further processing |
AddBlob(Blob)
Adds an entry to this collection
Declaration
public IMutableArray AddBlob(Blob value)
Parameters
| Type | Name | Description |
|---|---|---|
| Blob | value | The value to add |
Returns
| Type | Description |
|---|---|
| IMutableArray | The array for further processing |
AddBoolean(bool)
Adds an entry to this collection
Declaration
public IMutableArray AddBoolean(bool value)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | value | The value to add |
Returns
| Type | Description |
|---|---|
| IMutableArray | The array for further processing |
AddDate(DateTimeOffset)
Adds an entry to this collection
Declaration
public IMutableArray AddDate(DateTimeOffset value)
Parameters
| Type | Name | Description |
|---|---|---|
| DateTimeOffset | value | The value to add |
Returns
| Type | Description |
|---|---|
| IMutableArray | The array for further processing |
AddDictionary(DictionaryObject)
Adds an entry to this collection
Declaration
public IMutableArray AddDictionary(DictionaryObject value)
Parameters
| Type | Name | Description |
|---|---|---|
| DictionaryObject | value | The value to add |
Returns
| Type | Description |
|---|---|
| IMutableArray | The array for further processing |
AddDouble(double)
Adds an entry to this collection
Declaration
public IMutableArray AddDouble(double value)
Parameters
| Type | Name | Description |
|---|---|---|
| double | value | The value to add |
Returns
| Type | Description |
|---|---|
| IMutableArray | The array for further processing |
AddFloat(float)
Adds an entry to this collection
Declaration
public IMutableArray AddFloat(float value)
Parameters
| Type | Name | Description |
|---|---|---|
| float | value | The value to add |
Returns
| Type | Description |
|---|---|
| IMutableArray | The array for further processing |
AddInt(int)
Adds an entry to this collection
Declaration
public IMutableArray AddInt(int value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | value | The value to add |
Returns
| Type | Description |
|---|---|
| IMutableArray | The array for further processing |
AddLong(long)
Adds an entry to this collection
Declaration
public IMutableArray AddLong(long value)
Parameters
| Type | Name | Description |
|---|---|---|
| long | value | The value to add |
Returns
| Type | Description |
|---|---|
| IMutableArray | The array for further processing |
AddString(string)
Adds an entry to this collection
Declaration
public IMutableArray AddString(string value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | value | The value to add |
Returns
| Type | Description |
|---|---|
| IMutableArray | The array for further processing |
AddValue(object)
Adds an entry to this collection
Declaration
public IMutableArray AddValue(object value)
Parameters
| Type | Name | Description |
|---|---|---|
| object | value | The value to add |
Returns
| Type | Description |
|---|---|
| IMutableArray | The array for further processing |
GetArray(int)
Gets the value at the given index as an array
Declaration
public MutableArrayObject GetArray(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The index to lookup |
Returns
| Type | Description |
|---|---|
| MutableArrayObject | The value at the index, or |
GetDictionary(int)
Gets the value at the given index as a dictionary
Declaration
public MutableDictionaryObject GetDictionary(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The index to lookup |
Returns
| Type | Description |
|---|---|
| MutableDictionaryObject | The value at the index, or |
InsertArray(int, ArrayObject)
Inserts a given value at the given index
Declaration
public IMutableArray InsertArray(int index, ArrayObject value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The index to insert the item at |
| ArrayObject | value | The item to insert |
Returns
| Type | Description |
|---|---|
| IMutableArray | The array for further processing |
InsertBlob(int, Blob)
Inserts a given value at the given index
Declaration
public IMutableArray InsertBlob(int index, Blob value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The index to insert the item at |
| Blob | value | The item to insert |
Returns
| Type | Description |
|---|---|
| IMutableArray | The array for further processing |
InsertBoolean(int, bool)
Inserts a given value at the given index
Declaration
public IMutableArray InsertBoolean(int index, bool value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The index to insert the item at |
| bool | value | The item to insert |
Returns
| Type | Description |
|---|---|
| IMutableArray | The array for further processing |
InsertDate(int, DateTimeOffset)
Inserts a given value at the given index
Declaration
public IMutableArray InsertDate(int index, DateTimeOffset value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The index to insert the item at |
| DateTimeOffset | value | The item to insert |
Returns
| Type | Description |
|---|---|
| IMutableArray | The array for further processing |
InsertDictionary(int, DictionaryObject)
Inserts a given value at the given index
Declaration
public IMutableArray InsertDictionary(int index, DictionaryObject value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The index to insert the item at |
| DictionaryObject | value | The item to insert |
Returns
| Type | Description |
|---|---|
| IMutableArray | The array for further processing |
InsertDouble(int, double)
Inserts a given value at the given index
Declaration
public IMutableArray InsertDouble(int index, double value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The index to insert the item at |
| double | value | The item to insert |
Returns
| Type | Description |
|---|---|
| IMutableArray | The array for further processing |
InsertFloat(int, float)
Inserts a given value at the given index
Declaration
public IMutableArray InsertFloat(int index, float value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The index to insert the item at |
| float | value | The item to insert |
Returns
| Type | Description |
|---|---|
| IMutableArray | The array for further processing |
InsertInt(int, int)
Inserts a given value at the given index
Declaration
public IMutableArray InsertInt(int index, int value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The index to insert the item at |
| int | value | The item to insert |
Returns
| Type | Description |
|---|---|
| IMutableArray | The array for further processing |
InsertLong(int, long)
Inserts a given value at the given index
Declaration
public IMutableArray InsertLong(int index, long value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The index to insert the item at |
| long | value | The item to insert |
Returns
| Type | Description |
|---|---|
| IMutableArray | The array for further processing |
InsertString(int, string)
Inserts a given value at the given index
Declaration
public IMutableArray InsertString(int index, string value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The index to insert the item at |
| string | value | The item to insert |
Returns
| Type | Description |
|---|---|
| IMutableArray | The array for further processing |
InsertValue(int, object)
Inserts a given value at the given index
Declaration
public IMutableArray InsertValue(int index, object value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The index to insert the item at |
| object | value | The item to insert |
Returns
| Type | Description |
|---|---|
| IMutableArray | The array for further processing |
RemoveAt(int)
Removes the item at the given index
Declaration
public IMutableArray RemoveAt(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The index at which to remove the item |
Returns
| Type | Description |
|---|---|
| IMutableArray | The array for further processing |
SetArray(int, ArrayObject)
Overwrites the value at the given index with the given value
Declaration
public IMutableArray SetArray(int index, ArrayObject value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The index to overwrite |
| ArrayObject | value | The value to insert |
Returns
| Type | Description |
|---|---|
| IMutableArray | The array for further processing |
SetBlob(int, Blob)
Overwrites the value at the given index with the given value
Declaration
public IMutableArray SetBlob(int index, Blob value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The index to overwrite |
| Blob | value | The value to insert |
Returns
| Type | Description |
|---|---|
| IMutableArray | The array for further processing |
SetBoolean(int, bool)
Overwrites the value at the given index with the given value
Declaration
public IMutableArray SetBoolean(int index, bool value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The index to overwrite |
| bool | value | The value to insert |
Returns
| Type | Description |
|---|---|
| IMutableArray | The array for further processing |
SetData(IList)
Replaces the contents of this collection with the contents of the given one
Declaration
public IMutableArray SetData(IList array)
Parameters
| Type | Name | Description |
|---|---|---|
| IList | array | The contents to replace the current contents |
Returns
| Type | Description |
|---|---|
| IMutableArray | The array for further processing |
SetDate(int, DateTimeOffset)
Overwrites the value at the given index with the given value
Declaration
public IMutableArray SetDate(int index, DateTimeOffset value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The index to overwrite |
| DateTimeOffset | value | The value to insert |
Returns
| Type | Description |
|---|---|
| IMutableArray | The array for further processing |
SetDictionary(int, DictionaryObject)
Overwrites the value at the given index with the given value
Declaration
public IMutableArray SetDictionary(int index, DictionaryObject value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The index to overwrite |
| DictionaryObject | value | The value to insert |
Returns
| Type | Description |
|---|---|
| IMutableArray | The array for further processing |
SetDouble(int, double)
Overwrites the value at the given index with the given value
Declaration
public IMutableArray SetDouble(int index, double value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The index to overwrite |
| double | value | The value to insert |
Returns
| Type | Description |
|---|---|
| IMutableArray | The array for further processing |
SetFloat(int, float)
Overwrites the value at the given index with the given value
Declaration
public IMutableArray SetFloat(int index, float value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The index to overwrite |
| float | value | The value to insert |
Returns
| Type | Description |
|---|---|
| IMutableArray | The array for further processing |
SetInt(int, int)
Overwrites the value at the given index with the given value
Declaration
public IMutableArray SetInt(int index, int value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The index to overwrite |
| int | value | The value to insert |
Returns
| Type | Description |
|---|---|
| IMutableArray | The array for further processing |
SetJSON(string)
Replaces the contents of this collection with the contents of the given json string
Declaration
public IMutableArray SetJSON(string json)
Parameters
| Type | Name | Description |
|---|---|---|
| string | json | The json string to replace the current contents with |
Returns
| Type | Description |
|---|---|
| IMutableArray | The array for further processing |
Remarks
json string must be constructed from ToJSON
SetLong(int, long)
Overwrites the value at the given index with the given value
Declaration
public IMutableArray SetLong(int index, long value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The index to overwrite |
| long | value | The value to insert |
Returns
| Type | Description |
|---|---|
| IMutableArray | The array for further processing |
SetString(int, string)
Overwrites the value at the given index with the given value
Declaration
public IMutableArray SetString(int index, string value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The index to overwrite |
| string | value | The value to insert |
Returns
| Type | Description |
|---|---|
| IMutableArray | The array for further processing |
SetValue(int, object)
Overwrites the value at the given index with the given value
Declaration
public IMutableArray SetValue(int index, object value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The index to overwrite |
| object | value | The value to insert |
Returns
| Type | Description |
|---|---|
| IMutableArray | The array for further processing |