C# Client Library
A C# Client Library for the AnalyzeRe REST API
Loading...
Searching...
No Matches
AnalyzeRe.LargeDataUpload.IProducerConsumerBuffer< out TProduced > Interface Template Reference

Interface for a class that consumes from a source asynchronously and produces a queue of some other resource to be consumed. More...

Public Member Functions

void Cancel ()
 Stop the producer from reading any more bytes.
 
void Start (CancellationToken? cancellationToken=null)
 Start the asynchronous producer.
 
TProduced TryTake (out bool success, CancellationToken? cancellation)
 Attempts to remove an item from the produced list. May block if there is not yet an item ready, or return success:false.
 

Properties

bool CanTake [get]
 Indicates whether a call to Take will ever return another item.
 
bool IsRunning [get]
 Indicates whether the producer is currently running.
 

Detailed Description

Interface for a class that consumes from a source asynchronously and produces a queue of some other resource to be consumed.

Definition at line 8 of file IProducerConsumerBuffer.cs.

Inheritance diagram for AnalyzeRe.LargeDataUpload.IProducerConsumerBuffer< out TProduced >:

Member Function Documentation

◆ Cancel()

void AnalyzeRe.LargeDataUpload.IProducerConsumerBuffer< out TProduced >.Cancel ( )

Stop the producer from reading any more bytes.

◆ Start()

void AnalyzeRe.LargeDataUpload.IProducerConsumerBuffer< out TProduced >.Start ( CancellationToken?  cancellationToken = null)

Start the asynchronous producer.

Parameters
cancellationTokenCancellation token that will notify this producer if it is cancelled.

◆ TryTake()

TProduced AnalyzeRe.LargeDataUpload.IProducerConsumerBuffer< out TProduced >.TryTake ( out bool  success,
CancellationToken?  cancellation 
)

Attempts to remove an item from the produced list. May block if there is not yet an item ready, or return success:false.

Parameters
successReturns true if a valid item was returned.
cancellationA cancellation token to cancel.
Returns
The item removed from the list.

Property Documentation

◆ CanTake

bool AnalyzeRe.LargeDataUpload.IProducerConsumerBuffer< out TProduced >.CanTake
get

Indicates whether a call to Take will ever return another item.

Definition at line 14 of file IProducerConsumerBuffer.cs.

◆ IsRunning

bool AnalyzeRe.LargeDataUpload.IProducerConsumerBuffer< out TProduced >.IsRunning
get

Indicates whether the producer is currently running.

Definition at line 11 of file IProducerConsumerBuffer.cs.


The documentation for this interface was generated from the following file: