Table of Contents

Method QueueTryAdd

Namespace
MVVrus.AspNetCore.ActiveSession
Assembly
MVVrus.AspNetCore.ActiveSession.dll

QueueTryAdd(TItem)

Protected. Adds an item to the queue.

protected bool QueueTryAdd(TItem Item)

Parameters

Item TItem

The item to be added

Returns

bool

true if the item was successfully added , false overwise.

Remarks

This method is really implemented via a BlockingCollection<TItem>.TryAdd(TItem, -1, CompletionToken) accompanied by an interception of OperationCanceledException. It returns false value then and only then CompletionToken is canceled (usually via Abort() call).