Class ChartFile
- Namespace
- ChartTools.IO.Chart
- Assembly
- ChartTools.dll
Provides methods for reading and writing chart files
public static class ChartFile
- Inheritance
-
ChartFile
- Inherited Members
Properties
DefaultReadConfig
Default configuration to use for reading when the provided configuration is default
public static ChartReadingConfiguration DefaultReadConfig { get; set; }
Property Value
DefaultWriteConfig
Default configuration to use for writing when the provided configuration is default
public static ChartWritingConfiguration DefaultWriteConfig { get; set; }
Property Value
Methods
ReadComponents(ReadingDataSource, ComponentList, ChartReadingConfiguration?, FormattingRules?)
public static Song ReadComponents(ReadingDataSource source, ComponentList components, ChartReadingConfiguration? config = null, FormattingRules? formatting = null)
Parameters
source
ReadingDataSourcecomponents
ComponentListconfig
ChartReadingConfigurationformatting
FormattingRules
Returns
ReadComponentsAsync(ReadingDataSource, ComponentList, ChartReadingConfiguration?, FormattingRules?, CancellationToken)
public static Task<Song> ReadComponentsAsync(ReadingDataSource source, ComponentList components, ChartReadingConfiguration? config = null, FormattingRules? formatting = null, CancellationToken cancellationToken = default)
Parameters
source
ReadingDataSourcecomponents
ComponentListconfig
ChartReadingConfigurationformatting
FormattingRulescancellationToken
CancellationToken
Returns
ReadGlobalEvents(ReadingDataSource)
public static List<GlobalEvent> ReadGlobalEvents(ReadingDataSource source)
Parameters
source
ReadingDataSource
Returns
ReadGlobalEventsAsync(ReadingDataSource, CancellationToken)
public static Task<List<GlobalEvent>> ReadGlobalEventsAsync(ReadingDataSource source, CancellationToken cancellationToken = default)
Parameters
source
ReadingDataSourcecancellationToken
CancellationToken
Returns
ReadInstruments(ReadingDataSource, InstrumentComponentList, ChartReadingConfiguration?, FormattingRules?)
public static InstrumentSet ReadInstruments(ReadingDataSource source, InstrumentComponentList components, ChartReadingConfiguration? config = null, FormattingRules? formatting = null)
Parameters
source
ReadingDataSourcecomponents
InstrumentComponentListconfig
ChartReadingConfigurationformatting
FormattingRules
Returns
ReadInstrumentsAsync(ReadingDataSource, InstrumentComponentList, ChartReadingConfiguration?, FormattingRules?, CancellationToken)
public static Task<InstrumentSet> ReadInstrumentsAsync(ReadingDataSource source, InstrumentComponentList components, ChartReadingConfiguration? config = null, FormattingRules? formatting = null, CancellationToken cancellationToken = default)
Parameters
source
ReadingDataSourcecomponents
InstrumentComponentListconfig
ChartReadingConfigurationformatting
FormattingRulescancellationToken
CancellationToken
Returns
ReadMetadata(ReadingDataSource, Metadata?)
Reads metadata from a chart file.
public static Metadata ReadMetadata(ReadingDataSource source, Metadata? existing = null)
Parameters
source
ReadingDataSourceexisting
Metadata
Returns
ReadMetadataAsync(ReadingDataSource, Metadata?, CancellationToken)
public static Task<Metadata> ReadMetadataAsync(ReadingDataSource source, Metadata? existing = null, CancellationToken cancellationToken = default)
Parameters
source
ReadingDataSourceexisting
MetadatacancellationToken
CancellationToken
Returns
ReadSong(ReadingDataSource, ChartReadingConfiguration?, FormattingRules?)
public static Song ReadSong(ReadingDataSource source, ChartReadingConfiguration? config = null, FormattingRules? formatting = null)
Parameters
source
ReadingDataSourceconfig
ChartReadingConfigurationformatting
FormattingRules
Returns
ReadSongAsync(ReadingDataSource, ChartReadingConfiguration?, FormattingRules?, CancellationToken)
public static Task<Song> ReadSongAsync(ReadingDataSource source, ChartReadingConfiguration? config = null, FormattingRules? formatting = null, CancellationToken cancellationToken = default)
Parameters
source
ReadingDataSourceconfig
ChartReadingConfigurationformatting
FormattingRulescancellationToken
CancellationToken
Returns
ReadSyncTrack(ReadingDataSource, ChartReadingConfiguration?)
public static SyncTrack ReadSyncTrack(ReadingDataSource source, ChartReadingConfiguration? config = null)
Parameters
source
ReadingDataSourceconfig
ChartReadingConfiguration
Returns
ReadSyncTrackAsync(ReadingDataSource, ChartReadingConfiguration?, CancellationToken)
public static Task<SyncTrack> ReadSyncTrackAsync(ReadingDataSource source, ChartReadingConfiguration? config = null, CancellationToken cancellationToken = default)
Parameters
source
ReadingDataSourceconfig
ChartReadingConfigurationcancellationToken
CancellationToken
Returns
ReadVocals(ReadingDataSource)
public static StandardVocalsTrack ReadVocals(ReadingDataSource source)
Parameters
source
ReadingDataSource
Returns
ReadVocalsAsync(ReadingDataSource, CancellationToken)
public static Task<StandardVocalsTrack> ReadVocalsAsync(ReadingDataSource source, CancellationToken cancellationToken = default)
Parameters
source
ReadingDataSourcecancellationToken
CancellationToken
Returns
ReplaceComponents(WritingDataSource, Song, ComponentList, ChartWritingConfiguration?)
public static void ReplaceComponents(WritingDataSource source, Song song, ComponentList components, ChartWritingConfiguration? config = null)
Parameters
source
WritingDataSourcesong
Songcomponents
ComponentListconfig
ChartWritingConfiguration
ReplaceComponentsAsync(WritingDataSource, Song, ComponentList, ChartWritingConfiguration?, CancellationToken)
public static Task ReplaceComponentsAsync(WritingDataSource source, Song song, ComponentList components, ChartWritingConfiguration? config = null, CancellationToken cancellationToken = default)
Parameters
source
WritingDataSourcesong
Songcomponents
ComponentListconfig
ChartWritingConfigurationcancellationToken
CancellationToken
Returns
ReplaceGlobalEvents(WritingDataSource, IEnumerable<GlobalEvent>)
Replaces the global events in a file.
public static void ReplaceGlobalEvents(WritingDataSource source, IEnumerable<GlobalEvent> events)
Parameters
source
WritingDataSourceevents
IEnumerable<GlobalEvent>Events to use as a replacement
ReplaceGlobalEventsAsync(WritingDataSource, IEnumerable<GlobalEvent>, CancellationToken)
public static Task ReplaceGlobalEventsAsync(WritingDataSource source, IEnumerable<GlobalEvent> events, CancellationToken cancellationToken = default)
Parameters
source
WritingDataSourceevents
IEnumerable<GlobalEvent>cancellationToken
CancellationToken
Returns
ReplaceInstruments(WritingDataSource, InstrumentSet, InstrumentComponentList, ChartWritingConfiguration?, FormattingRules?)
public static void ReplaceInstruments(WritingDataSource source, InstrumentSet set, InstrumentComponentList components, ChartWritingConfiguration? config = null, FormattingRules? formatting = null)
Parameters
source
WritingDataSourceset
InstrumentSetcomponents
InstrumentComponentListconfig
ChartWritingConfigurationformatting
FormattingRules
ReplaceInstrumentsAsync(WritingDataSource, InstrumentSet, InstrumentComponentList, ChartWritingConfiguration?, FormattingRules?, CancellationToken)
public static Task ReplaceInstrumentsAsync(WritingDataSource source, InstrumentSet set, InstrumentComponentList components, ChartWritingConfiguration? config = null, FormattingRules? formatting = null, CancellationToken cancellationToken = default)
Parameters
source
WritingDataSourceset
InstrumentSetcomponents
InstrumentComponentListconfig
ChartWritingConfigurationformatting
FormattingRulescancellationToken
CancellationToken
Returns
ReplaceMetadata(WritingDataSource, Metadata)
Replaces the metadata in a file.
public static void ReplaceMetadata(WritingDataSource source, Metadata metadata)
Parameters
source
WritingDataSourcemetadata
MetadataMetadata to write
ReplaceMetadataAsync(WritingDataSource, Metadata, CancellationToken)
public static Task ReplaceMetadataAsync(WritingDataSource source, Metadata metadata, CancellationToken cancellationToken = default)
Parameters
source
WritingDataSourcemetadata
MetadatacancellationToken
CancellationToken
Returns
ReplaceSyncTrack(WritingDataSource, SyncTrack, ChartWritingConfiguration?)
Replaces the sync track in a file.
public static void ReplaceSyncTrack(WritingDataSource source, SyncTrack syncTrack, ChartWritingConfiguration? config = null)
Parameters
source
WritingDataSourcesyncTrack
SyncTrackSync track to write
config
ChartWritingConfiguration
ReplaceSyncTrackAsync(WritingDataSource, SyncTrack, ChartWritingConfiguration?, CancellationToken)
public static Task ReplaceSyncTrackAsync(WritingDataSource source, SyncTrack syncTrack, ChartWritingConfiguration? config = null, CancellationToken cancellationToken = default)
Parameters
source
WritingDataSourcesyncTrack
SyncTrackconfig
ChartWritingConfigurationcancellationToken
CancellationToken
Returns
WriteSong(WritingDataSource, Song, ChartWritingConfiguration?)
Writes a song to a chart file.
public static void WriteSong(WritingDataSource source, Song song, ChartWritingConfiguration? config = null)
Parameters
source
WritingDataSourcesong
SongSong to write
config
ChartWritingConfiguration
WriteSong(Stream, Song, ChartWritingConfiguration?)
public static void WriteSong(Stream stream, Song song, ChartWritingConfiguration? config = null)
Parameters
stream
Streamsong
Songconfig
ChartWritingConfiguration
WriteSong(string, Song, ChartWritingConfiguration?)
public static void WriteSong(string path, Song song, ChartWritingConfiguration? config = null)
Parameters
path
stringsong
Songconfig
ChartWritingConfiguration
WriteSongAsync(WritingDataSource, Song, ChartWritingConfiguration?, CancellationToken)
public static Task WriteSongAsync(WritingDataSource source, Song song, ChartWritingConfiguration? config = null, CancellationToken cancellationToken = default)
Parameters
source
WritingDataSourcesong
Songconfig
ChartWritingConfigurationcancellationToken
CancellationToken
Returns
WriteSongAsync(Stream, Song, ChartWritingConfiguration?, CancellationToken)
public static Task WriteSongAsync(Stream stream, Song song, ChartWritingConfiguration? config = null, CancellationToken cancellationToken = default)
Parameters
stream
Streamsong
Songconfig
ChartWritingConfigurationcancellationToken
CancellationToken
Returns
WriteSongAsync(string, Song, ChartWritingConfiguration?, CancellationToken)
public static Task WriteSongAsync(string path, Song song, ChartWritingConfiguration? config = null, CancellationToken cancellationToken = default)
Parameters
path
stringsong
Songconfig
ChartWritingConfigurationcancellationToken
CancellationToken