Table of Contents

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

T

The item type being processed

Inherited Members
Extension Methods

Properties

Count

Gets the number of items held within this collection

int Count { get; }

Property Value

int

IsBusy

Returns true if processing, false otherwise

bool IsBusy { get; }

Property Value

bool

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

WaitHandle

Methods

Add(T)

Adds the items to this collection

void Add(T item)

Parameters

item T

The item to be added

Add(T, CancellationToken)

Adds the items to this collection

void Add(T item, CancellationToken cancellationToken)

Parameters

item T

The item to be added

cancellationToken CancellationToken

A 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

cancellationToken CancellationToken

A cancellation token to observer

Returns

IEnumerable<T>

An enumerable that removes and returns items from the collection