Class DataBlockWriterBase
- Namespace
- FitsModel.FitsStream.Writer
- Assembly
- FitsModel.dll
Defines a base class for writing FitsDataBlocks and managing cancellation.
public abstract class DataBlockWriterBase : IFitsDataBlockWriter
- Inheritance
-
DataBlockWriterBase
- Implements
- Derived
- Inherited Members
Constructors
DataBlockWriterBase()
protected DataBlockWriterBase()
Properties
CancelToken
Publicly accessible cancellation token.
public CancellationToken CancelToken { get; }
Property Value
StreamCancel
Cancellation token to use in case we are done processing the stream. Otherwise, you will need to provide the StreamCancel to whatever method you are using to read the stream.
protected CancellationTokenSource StreamCancel { get; }
Property Value
Methods
Cancel()
Indicates that this writer should stop processing any further data blocks.
public Task Cancel()
Returns
CancelSync()
Indicates that this writer should stop processing any further data blocks.
public void CancelSync()
Write(FitsDataBlock)
Writes the provided dataBlock
to this data block writer.
public void Write(FitsDataBlock dataBlock)
Parameters
dataBlock
FitsDataBlockFitsDataBlock to write.
WriteDataBlock(FitsDataBlock)
Asynchronously writes a data block.
public abstract void WriteDataBlock(FitsDataBlock dataBlock)
Parameters
dataBlock
FitsDataBlockData block to write.