Interface IBusyCollection<T>
- Namespace
- FinanceSharp.Interfaces
- Assembly
- FinanceSharp.dll
Interface used to handle items being processed and communicate busy state
public interface IBusyCollection<T> : IDisposable
Type Parameters
TThe item type being processed
- Inherited Members
- Extension Methods
Properties
Count
Gets the number of items held within this collection
int Count { get; }
Property Value
IsBusy
Returns true if processing, false otherwise
bool IsBusy { get; }
Property Value
WaitHandle
Gets a wait handle that can be used to wait until this instance is done processing all of it's item
WaitHandle WaitHandle { get; }
Property Value
Methods
Add(T)
Adds the items to this collection
void Add(T item)
Parameters
itemTThe item to be added
Add(T, CancellationToken)
Adds the items to this collection
void Add(T item, CancellationToken cancellationToken)
Parameters
itemTThe item to be added
cancellationTokenCancellationTokenA cancellation token to observer
CompleteAdding()
Marks the collection as not accepting any more additions
void CompleteAdding()
GetConsumingEnumerable()
Provides a consuming enumerable for items in this collection.
IEnumerable<T> GetConsumingEnumerable()
Returns
- IEnumerable<T>
An enumerable that removes and returns items from the collection
GetConsumingEnumerable(CancellationToken)
Provides a consuming enumerable for items in this collection.
IEnumerable<T> GetConsumingEnumerable(CancellationToken cancellationToken)
Parameters
cancellationTokenCancellationTokenA cancellation token to observer
Returns
- IEnumerable<T>
An enumerable that removes and returns items from the collection