Show / Hide Table of Contents

Interface IArray

An interface representing a read-only linear collection of objects

Inherited Members
IArrayFragment.this[int]
IEnumerable<object>.GetEnumerator()
Namespace: Couchbase.Lite
Assembly: Couchbase.Lite.dll
Syntax
[JsonConverter(typeof(IArrayConverter))]
public interface IArray : IArrayFragment, IEnumerable<object>, IEnumerable

Properties

| Improve this Doc View Source

Count

Gets the number of elements in this array

Declaration
int Count { get; }
Property Value
Type Description
int

Methods

| Improve this Doc View Source

GetArray(int)

Gets the value at the given index as a read only array

Declaration
ArrayObject GetArray(int index)
Parameters
Type Name Description
int index

The index to lookup

Returns
Type Description
ArrayObject

The value at the index, or null

| Improve this Doc View Source

GetBlob(int)

Gets the value at the given index as a Blob

Declaration
Blob GetBlob(int index)
Parameters
Type Name Description
int index

The index to lookup

Returns
Type Description
Blob

The value at the index, or null

| Improve this Doc View Source

GetBoolean(int)

Gets the value at the given index as a bool

Declaration
bool GetBoolean(int index)
Parameters
Type Name Description
int index

The index to lookup

Returns
Type Description
bool

The value at the index, or its converted equivalent

Remarks

Any non-zero object will be treated as true, so don't rely on any sort of parsing

| Improve this Doc View Source

GetDate(int)

Gets the value at the given index as a DateTimeOffset

Declaration
DateTimeOffset GetDate(int index)
Parameters
Type Name Description
int index

The index to lookup

Returns
Type Description
DateTimeOffset

The value at the index, or a default

| Improve this Doc View Source

GetDictionary(int)

Gets the value at the given index as a DictionaryObject

Declaration
DictionaryObject GetDictionary(int index)
Parameters
Type Name Description
int index

The index to lookup

Returns
Type Description
DictionaryObject

The value at the index, or null

| Improve this Doc View Source

GetDouble(int)

Gets the value at the given index as a double

Declaration
double GetDouble(int index)
Parameters
Type Name Description
int index

The index to lookup

Returns
Type Description
double

The value at the index, or its converted equivalent

Remarks

true will be converted to 1.0, and everything else that is non-numeric will be 0.0

| Improve this Doc View Source

GetFloat(int)

Gets the value at the given index as a float

Declaration
float GetFloat(int index)
Parameters
Type Name Description
int index

The index to lookup

Returns
Type Description
float

The value at the index, or its converted equivalent

Remarks

true will be converted to 1.0f, and everything else that is non-numeric will be 0.0f

| Improve this Doc View Source

GetInt(int)

Gets the value at the given index as an int

Declaration
int GetInt(int index)
Parameters
Type Name Description
int index

The index to lookup

Returns
Type Description
int

The value at the index, or its converted equivalent

Remarks

true will be converted to 1, a double value will be rounded, and everything else non-numeric will be 0

| Improve this Doc View Source

GetLong(int)

Gets the value at the given index as an long

Declaration
long GetLong(int index)
Parameters
Type Name Description
int index

The index to lookup

Returns
Type Description
long

The value at the index, or its converted equivalent

Remarks

true will be converted to 1, a double value will be rounded, and everything else non-numeric will be 0

| Improve this Doc View Source

GetString(int)

Gets the value at the given index as a string

Declaration
string GetString(int index)
Parameters
Type Name Description
int index

The index to lookup

Returns
Type Description
string

The value at the index, or null

| Improve this Doc View Source

GetValue(int)

Gets the value at the given index as an untyped object

Declaration
object GetValue(int index)
Parameters
Type Name Description
int index

The index to lookup

Returns
Type Description
object

The value at the index, or null

Remarks

This method should be avoided for numeric types, whose underlying representation is subject to change and thus InvalidCastExceptions

| Improve this Doc View Source

ToList()

Converts the contents of the array to a .NET list type

Declaration
List<object> ToList()
Returns
Type Description
List<object>

The contents of the array as a .NET list

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX