Class BulkOperationsCollection<TOperation>
This class is used by Operations which needs thread safe adding Add(T) as well as expose
an equivalent of AddRange(IEnumerable<T>). Because operations from OpenSearch are executed in order none of the types in
System.Collection.Concurrent can't be used for this. We need to preserve insert order and exposed indexed index because Items
is ordered and lines up with Operations allowing one to zip the two together.
Inheritance
BulkOperationsCollection<TOperation>
Assembly: OpenSearch.Client.dll
Syntax
[ComVisible(false)]
public sealed class BulkOperationsCollection<TOperation> : IList<TOperation>, ICollection<TOperation>, IEnumerable<TOperation>, IList, ICollection, IEnumerable where TOperation : IBulkOperation
Type Parameters
Name |
Description |
TOperation |
|
Constructors
|
Edit this page
View Source
BulkOperationsCollection()
Declaration
public BulkOperationsCollection()
|
Edit this page
View Source
BulkOperationsCollection(IEnumerable<TOperation>)
Declaration
public BulkOperationsCollection(IEnumerable<TOperation> operations)
Parameters
Type |
Name |
Description |
IEnumerable<TOperation> |
operations |
|
Properties
|
Edit this page
View Source
Count
Declaration
public int Count { get; }
Property Value
|
Edit this page
View Source
this[int]
Declaration
public TOperation this[int index] { get; set; }
Parameters
Type |
Name |
Description |
int |
index |
|
Property Value
Type |
Description |
TOperation |
|
Methods
|
Edit this page
View Source
Add(TOperation)
Declaration
public void Add(TOperation item)
Parameters
Type |
Name |
Description |
TOperation |
item |
|
|
Edit this page
View Source
AddRange(IEnumerable<TOperation>)
Declaration
public void AddRange(IEnumerable<TOperation> items)
Parameters
|
Edit this page
View Source
Clear()
Declaration
|
Edit this page
View Source
Contains(TOperation)
Declaration
public bool Contains(TOperation item)
Parameters
Type |
Name |
Description |
TOperation |
item |
|
Returns
|
Edit this page
View Source
CopyTo(TOperation[], int)
Declaration
public void CopyTo(TOperation[] array, int index)
Parameters
Type |
Name |
Description |
TOperation[] |
array |
|
int |
index |
|
|
Edit this page
View Source
GetEnumerator()
Declaration
public IEnumerator<TOperation> GetEnumerator()
Returns
|
Edit this page
View Source
IndexOf(TOperation)
Declaration
public int IndexOf(TOperation item)
Parameters
Type |
Name |
Description |
TOperation |
item |
|
Returns
|
Edit this page
View Source
Insert(int, TOperation)
Declaration
public void Insert(int index, TOperation item)
Parameters
Type |
Name |
Description |
int |
index |
|
TOperation |
item |
|
|
Edit this page
View Source
Remove(TOperation)
Declaration
public bool Remove(TOperation item)
Parameters
Type |
Name |
Description |
TOperation |
item |
|
Returns
|
Edit this page
View Source
RemoveAt(int)
Declaration
public void RemoveAt(int index)
Parameters
Type |
Name |
Description |
int |
index |
|
Operators
|
Edit this page
View Source
implicit operator BulkOperationsCollection<TOperation>(List<TOperation>)
Declaration
public static implicit operator BulkOperationsCollection<TOperation>(List<TOperation> items)
Parameters
Type |
Name |
Description |
List<TOperation> |
items |
|
Returns
Implements
Extension Methods