Table of Contents

Class DataSource

Namespace
ChartTools.IO.Sources
Assembly
ChartTools.dll

Represents data sources that can be used as a Stream. This is an abstract class.

public abstract class DataSource : IDisposable
Inheritance
DataSource
Implements
Derived
Inherited Members

Constructors

DataSource(Stream)

Represents data sources that can be used as a Stream. This is an abstract class.

protected DataSource(Stream stream)

Parameters

stream Stream

Stream to source from. Derived types can impose minimum read/write access.

DataSource(string, FileMode, FileAccess, FileShare)

Base constructor to create a DataSource from a file path

public DataSource(string path, FileMode mode, FileAccess access, FileShare share)

Parameters

path string

File path

mode FileMode

How the file should be opened

access FileAccess

Read/write access

share FileShare

External permissions while the file is open

Remarks

Initializes the stream as a FileStream that is disposed with the source.

Properties

Path

Source file path if one was used to create the source

public string? Path { get; }

Property Value

string

Stream

Usable stream provided or generated

public Stream Stream { get; }

Property Value

Stream

Remarks

Read/write access defined by the source's runtime type

Methods

Dispose()

Disposes the source with the stream if generated by the source.

public virtual void Dispose()