Interface IPersistentList<T>
Represents an IList<T> which is persisted to a backing store.
Inherited Members
Namespace: Couchbase.DataStructures
Assembly: Couchbase.NetClient.dll
Syntax
public interface IPersistentList<T> : ICollection, IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable, IAsyncEnumerable<T>
Type Parameters
Name | Description |
---|---|
T | Type of value in the set. |
Remarks
If using a System
Properties
| Edit this page View SourceCountAsync
Counts the items in the list.
Declaration
Task<int> CountAsync { get; }
Property Value
Type | Description |
---|---|
Task<int> | A Task<TResult> for awaiting. The value is the number of items in the list. |
Methods
| Edit this page 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
Remarks
Override Object.Equals if using POCOs; .NET Records do so implicitly.
ClearAsync()
Clears the document.
Declaration
Task ClearAsync()
Returns
| Edit this page View SourceContainsAsync(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<bool> | A Task<TResult> for awaiting. True if the item exists, otherwise false. |
Remarks
Override Object.Equals if using POCOs; .NET Records do so implicitly.
CopyToAsync(Array, int)
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. |
int | index | The starting index. |
Returns
Type | Description |
---|---|
Task |
CopyToAsync(T[], int)
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. |
int | arrayIndex | The starting index. |
Returns
| Edit this page View SourceIndexOfAsync(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<int> | A Task<TResult> for awaiting. The value is the index of item in the list. |
Remarks
Override Object.Equals if using POCOs; .NET Records do so implicitly.
InsertAsync(int, T)
Inserts an item into the list.
Declaration
Task InsertAsync(int index, T item)
Parameters
Type | Name | Description |
---|---|---|
int | 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
Remarks
Override Object.Equals if using POCOs; .NET Records do so implicitly.
RemoveAtAsync(int)
Removes an item item from the list.
Declaration
Task RemoveAtAsync(int index)
Parameters
Type | Name | Description |
---|---|---|
int | index | The starting index. |
Returns
Remarks
Override Object.Equals if using POCOs; .NET Records do so implicitly.