Table of Contents

Class ReadingDataSource

Namespace
ChartTools.IO.Sources
Assembly
ChartTools.dll

Represents a source of data to read from that can be used as a Stream.

public class ReadingDataSource : DataSource, IDisposable
Inheritance
ReadingDataSource
Implements
Inherited Members

Remarks

Can be implicitly converted from a string or Stream.

Constructors

ReadingDataSource(Stream)

Creates a ReadingDataSource from a Stream.

public ReadingDataSource(Stream stream)

Parameters

stream Stream

Stream to source from. Must be readable through CanRead.

Remarks

The stream is kept alive after the lifetime of the ReadingDataSource.

Exceptions

ArgumentException

The stream is not readable.

ReadingDataSource(string)

Creates a ReadingDataSource from a file path.

public ReadingDataSource(string path)

Parameters

path string

Path of the file to source from

Remarks

Initializes the stream as a FileStream with Read and Write.

The stream is disposed when disposing the ReadingDataSource.

Operators

implicit operator ReadingDataSource(Stream)

Creates a ReadingDataSource from a Stream.

public static implicit operator ReadingDataSource(Stream stream)

Parameters

stream Stream

Stream to source from. Must be readable through CanRead.

Returns

ReadingDataSource

Remarks

The stream is kept alive after the lifetime of the ReadingDataSource.

Exceptions

ArgumentException

The stream is not readable.

implicit operator ReadingDataSource(string)

Creates a ReadingDataSource from a file path.

public static implicit operator ReadingDataSource(string path)

Parameters

path string

Path of the file to source from

Returns

ReadingDataSource

Remarks

Initializes the stream as a FileStream with Read and Write.

The stream is disposed when disposing the ReadingDataSource.