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
StreamStream 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
stringFile path
mode
FileModeHow the file should be opened
access
FileAccessRead/write access
share
FileShareExternal 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
Stream
Usable stream provided or generated
public Stream Stream { get; }
Property Value
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()