Interface IPersistentList<T>
Represents an
Namespace: Couchbase.DataStructures
Assembly: Couchbase.NetClient.dll
Syntax
public interface IPersistentList<T> : Collections.ICollection, IList<T>, IAsyncEnumerable<T>
Type Parameters
Name | Description |
---|---|
T | Type of value in the set. |
Remarks
If using a SystemTextJsonSerializer backed by a
Properties
| Improve this Doc View SourceCountAsync
Counts the items in the list.
Declaration
Task<int> CountAsync { get; }
Property Value
Type | Description |
---|---|
Task<System.Int32> | A |
Methods
| Improve this Doc View SourceAddAsync(T)
Adds an item into the document.
Declaration
Task AddAsync(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | The item to add. |
Returns
Type | Description |
---|---|
Task | A |
Remarks
Override Object.Equals if using POCOs; .NET Records do so implicitly.
ClearAsync()
Clears the document.
Declaration
Task ClearAsync()
Returns
Type | Description |
---|---|
Task | A |
ContainsAsync(T)
Checks to see if the document contains an item.
Declaration
Task<bool> ContainsAsync(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | The item |
Returns
Type | Description |
---|---|
Task<System.Boolean> | A |
Remarks
Override Object.Equals if using POCOs; .NET Records do so implicitly.
CopyToAsync(T[], Int32)
Copies an array into the document.
Declaration
Task CopyToAsync(T[] array, int arrayIndex)
Parameters
Type | Name | Description |
---|---|---|
T[] | array | The array of items to add to the document. |
System.Int32 | arrayIndex | The starting index. |
Returns
Type | Description |
---|---|
Task | A |
CopyToAsync(Array, Int32)
Copies an items into an array starting at an index.
Declaration
Task CopyToAsync(Array array, int index)
Parameters
Type | Name | Description |
---|---|---|
Array | array | The array of items to add to the document. |
System.Int32 | index | The starting index. |
Returns
Type | Description |
---|---|
Task |
IndexOfAsync(T)
Returns the index of item in the list.
Declaration
Task<int> IndexOfAsync(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | An item which should have Object.Equals() overridden. |
Returns
Type | Description |
---|---|
Task<System.Int32> | A |
Remarks
Override Object.Equals if using POCOs; .NET Records do so implicitly.
InsertAsync(Int32, T)
Inserts an item into the list.
Declaration
Task InsertAsync(int index, T item)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The starting index. |
T | item | An item which should have Object.Equals() overridden. |
Returns
Type | Description |
---|---|
Task |
Remarks
Override Object.Equals if using POCOs; .NET Records do so implicitly.
RemoveAsync(T)
Attempts to remove an item from the list.
Declaration
Task<bool> RemoveAsync(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | An item which should have Object.Equals() overridden. |
Returns
Type | Description |
---|---|
Task<System.Boolean> | True if the item is found and removed; otherwise false. |
Remarks
Override Object.Equals if using POCOs; .NET Records do so implicitly.
RemoveAtAsync(Int32)
Removes an item item from the list.
Declaration
Task RemoveAtAsync(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The starting index. |
Returns
Type | Description |
---|---|
Task | A |
Remarks
Override Object.Equals if using POCOs; .NET Records do so implicitly.