Couchbase .NET SDK __CB_SDK_VERSION__

Show / Hide Table of Contents

Class PersistentList<TValue>

Inheritance
object
PersistentStoreBase<TValue>
PersistentList<TValue>
Implements
IPersistentList<TValue>
ICollection
IList<TValue>
ICollection<TValue>
IEnumerable<TValue>
IEnumerable
IAsyncEnumerable<TValue>
Inherited Members
PersistentStoreBase<TValue>.Clear()
PersistentStoreBase<TValue>.ClearAsync()
PersistentStoreBase<TValue>.CopyToAsync(Array, int)
PersistentStoreBase<TValue>.CopyTo(Array, int)
PersistentStoreBase<TValue>.CopyToAsync(TValue[], int)
PersistentStoreBase<TValue>.GetAsyncEnumerator(CancellationToken)
PersistentStoreBase<TValue>.CountAsync
PersistentStoreBase<TValue>.Count
PersistentStoreBase<TValue>.IsSynchronized
PersistentStoreBase<TValue>.SyncRoot
object.GetType()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Couchbase.DataStructures
Assembly: Couchbase.NetClient.dll
Syntax
public sealed class PersistentList<TValue> : PersistentStoreBase<TValue>, IPersistentList<TValue>, ICollection, IList<TValue>, ICollection<TValue>, IEnumerable<TValue>, IEnumerable, IAsyncEnumerable<TValue>
Type Parameters
Name Description
TValue

Properties

View Source

IsReadOnly

Declaration
public bool IsReadOnly { get; }
Property Value
Type Description
bool
View Source

this[int]

Declaration
[Obsolete("This method is blocking; please use the async equivalent instead.")]
public TValue this[int index] { get; set; }
Parameters
Type Name Description
int index
Property Value
Type Description
TValue

Methods

View Source

Add(TValue)

Declaration
[Obsolete("This method is blocking; please use the async version instead.")]
public void Add(TValue item)
Parameters
Type Name Description
TValue item
View Source

AddAsync(TValue)

Adds an item into the document.

Declaration
public Task AddAsync(TValue item)
Parameters
Type Name Description
TValue item

The item to add.

Returns
Type Description
Task

A Task for awaiting.

Remarks

Override Object.Equals if using POCOs; .NET Records do so implicitly.

View Source

Contains(TValue)

Declaration
[Obsolete("This method is blocking; please use the async version instead.")]
public bool Contains(TValue item)
Parameters
Type Name Description
TValue item
Returns
Type Description
bool
View Source

ContainsAsync(TValue)

Checks to see if the document contains an item.

Declaration
public Task<bool> ContainsAsync(TValue item)
Parameters
Type Name Description
TValue item

The item T to check for its existence.

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.

View Source

CopyTo(TValue[], int)

Declaration
[Obsolete("This method is blocking; please use the async version instead.")]
public void CopyTo(TValue[] array, int arrayIndex)
Parameters
Type Name Description
TValue[] array
int arrayIndex
View Source

GetEnumerator()

Declaration
[Obsolete("This method is blocking; please use the async version instead.")]
public IEnumerator<TValue> GetEnumerator()
Returns
Type Description
IEnumerator<TValue>
View Source

IndexOf(TValue)

Declaration
[Obsolete("This method is blocking; please use the async version instead.")]
public int IndexOf(TValue item)
Parameters
Type Name Description
TValue item
Returns
Type Description
int
View Source

IndexOfAsync(TValue)

Returns the index of item in the list.

Declaration
public Task<int> IndexOfAsync(TValue item)
Parameters
Type Name Description
TValue 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.

View Source

Insert(int, TValue)

Declaration
[Obsolete("This method is blocking; please use the async version instead.")]
public void Insert(int index, TValue item)
Parameters
Type Name Description
int index
TValue item
View Source

InsertAsync(int, TValue)

Inserts an item into the list.

Declaration
public Task InsertAsync(int index, TValue item)
Parameters
Type Name Description
int index

The starting index.

TValue 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.

View Source

Remove(TValue)

Declaration
[Obsolete("This method is blocking; please use the async version instead.")]
public bool Remove(TValue item)
Parameters
Type Name Description
TValue item
Returns
Type Description
bool
View Source

RemoveAsync(TValue)

Attempts to remove an item from the list.

Declaration
public Task<bool> RemoveAsync(TValue item)
Parameters
Type Name Description
TValue item

An item which should have Object.Equals() overridden.

Returns
Type Description
Task<bool>

True if the item is found and removed; otherwise false.

Remarks

Override Object.Equals if using POCOs; .NET Records do so implicitly.

View Source

RemoveAt(int)

Declaration
[Obsolete("This method is blocking; please use the async version instead.")]
public void RemoveAt(int index)
Parameters
Type Name Description
int index
View Source

RemoveAtAsync(int)

Removes an item item from the list.

Declaration
public Task RemoveAtAsync(int index)
Parameters
Type Name Description
int index

The starting index.

Returns
Type Description
Task

A Task for awaiting."

Remarks

Override Object.Equals if using POCOs; .NET Records do so implicitly.

View Source

SetAsync(int, TValue)

Declaration
public Task SetAsync(int index, TValue item)
Parameters
Type Name Description
int index
TValue item
Returns
Type Description
Task

Implements

IPersistentList<T>
ICollection
IList<T>
ICollection<T>
IEnumerable<T>
IEnumerable
IAsyncEnumerable<T>
  • View Source
In this article
Back to top Copyright © 2020 Couchbase, Inc. All rights reserved.